1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -slp-threshold=-99999 < %s | FileCheck %s
3 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -slp-threshold=-99999\
4 ; RUN: -slp-skip-early-profitability-check < %s | FileCheck %s --check-prefixes=FORCED
7 ; FORCED-LABEL: define i64 @wombat() {
9 ; FORCED-NEXT: br label [[BB2:%.*]]
11 ; FORCED-NEXT: br label [[BB2]]
13 ; FORCED-NEXT: [[PHI:%.*]] = phi i32 [ 0, [[BB:%.*]] ], [ 0, [[BB1:%.*]] ]
14 ; FORCED-NEXT: [[TMP0:%.*]] = insertelement <2 x i32> poison, i32 [[PHI]], i32 0
15 ; FORCED-NEXT: [[TMP1:%.*]] = shufflevector <2 x i32> [[TMP0]], <2 x i32> poison, <2 x i32> zeroinitializer
16 ; FORCED-NEXT: [[TMP2:%.*]] = trunc <2 x i32> [[TMP1]] to <2 x i1>
17 ; FORCED-NEXT: [[TMP3:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0
18 ; FORCED-NEXT: [[TMP4:%.*]] = zext i1 [[TMP3]] to i64
19 ; FORCED-NEXT: [[TMP5:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1
20 ; FORCED-NEXT: [[TMP6:%.*]] = zext i1 [[TMP5]] to i64
21 ; FORCED-NEXT: [[OR:%.*]] = or i64 [[TMP4]], [[TMP6]]
22 ; FORCED-NEXT: ret i64 [[OR]]
24 ; CHECK-LABEL: define i64 @wombat() {
26 ; CHECK-NEXT: br label [[BB2:%.*]]
28 ; CHECK-NEXT: br label [[BB2]]
30 ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ 0, [[BB:%.*]] ], [ 0, [[BB1:%.*]] ]
31 ; CHECK-NEXT: [[TMP4:%.*]] = zext i32 [[PHI]] to i64
32 ; CHECK-NEXT: [[TMP6:%.*]] = sext i32 [[PHI]] to i64
33 ; CHECK-NEXT: [[OR:%.*]] = or i64 [[TMP4]], [[TMP6]]
34 ; CHECK-NEXT: ret i64 [[OR]]
43 %phi = phi i32 [ 0, %bb ], [ 0, %bb1 ]
44 %zext = zext i32 %phi to i64
45 %sext = sext i32 %phi to i64
46 %or = or i64 %zext, %sext