1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown %s -slp-threshold=-5 | FileCheck %s
4 define i32 @test(ptr %isec) {
7 ; CHECK-NEXT: [[TMP1:%.*]] = load <2 x i32>, ptr [[ISEC:%.*]], align 8
8 ; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i32> [[TMP1]], <2 x i32> poison, <2 x i32> <i32 1, i32 0>
9 ; CHECK-NEXT: br i1 false, label [[BLOCK1:%.*]], label [[BLOCK3:%.*]]
11 ; CHECK-NEXT: br i1 false, label [[BLOCK2:%.*]], label [[BLOCK3]]
13 ; CHECK-NEXT: br label [[BLOCK3]]
15 ; CHECK-NEXT: [[TMP3:%.*]] = phi <2 x i32> [ [[TMP1]], [[BLOCK1]] ], [ [[TMP1]], [[BLOCK2]] ], [ [[TMP2]], [[ENTRY:%.*]] ]
16 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP3]], i32 0
17 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP3]], i32 1
18 ; CHECK-NEXT: [[TMP6:%.*]] = mul i32 [[TMP5]], [[TMP4]]
19 ; CHECK-NEXT: ret i32 [[TMP6]]
22 %0 = load <2 x i32>, ptr %isec, align 8
23 %1 = extractelement <2 x i32> %0, i32 1
24 %2 = extractelement <2 x i32> %0, i32 0
25 br i1 false, label %block1, label %block3
27 br i1 false, label %block2, label %block3
31 %3 = phi i32 [ %1, %block1 ], [ %1, %block2 ], [ %2, %entry ]
32 %4 = phi i32 [ %2, %block1 ], [ %2, %block2 ], [ %1, %entry ]