| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 | |
| ; RUN: opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s | |
| define <4 x i32> @test() { | |
| ; CHECK-LABEL: define <4 x i32> @test() { | |
| ; CHECK-NEXT: [[BB:.*:]] | |
| ; CHECK-NEXT: [[TRUNC:%.*]] = trunc i64 0 to i32 | |
| ; CHECK-NEXT: br label %[[BB1:.*]] | |
| ; CHECK: [[BB1]]: | |
| ; CHECK-NEXT: [[OR:%.*]] = or i32 [[TRUNC]], 0 | |
| ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <4 x i32> <i32 poison, i32 0, i32 poison, i32 poison>, i32 [[TRUNC]], i32 0 | |
| ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <4 x i32> [[TMP1]], <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 0> | |
| ; CHECK-NEXT: [[TMP3:%.*]] = and <4 x i32> <i32 -1, i32 0, i32 -1, i32 -1>, [[TMP2]] | |
| ; CHECK-NEXT: [[ZEXT:%.*]] = zext i32 [[OR]] to i64 | |
| ; CHECK-NEXT: br label %[[BB3:.*]] | |
| ; CHECK: [[BB3]]: | |
| ; CHECK-NEXT: ret <4 x i32> [[TMP3]] | |
| ; | |
| bb: | |
| %trunc = trunc i64 0 to i32 | |
| br label %bb1 | |
| bb1: | |
| %or = or i32 %trunc, 0 | |
| %zext = zext i32 %or to i64 | |
| %and = and i32 0, 0 | |
| %or2 = or i32 %trunc, 0 | |
| br label %bb3 | |
| bb3: | |
| %0 = insertelement <4 x i32> zeroinitializer, i32 %trunc, i32 0 | |
| %1 = insertelement <4 x i32> %0, i32 %and, i32 1 | |
| %2 = insertelement <4 x i32> %1, i32 %or2, i32 2 | |
| %3 = insertelement <4 x i32> %2, i32 %or, i32 3 | |
| ret <4 x i32> %3 | |
| } |