1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer,verify -slp-threshold=-99999 -S | FileCheck %s
4 target triple = "x86_64-unknown-linux-gnu"
6 define void @foo() personality ptr @bar {
9 ; CHECK-NEXT: br label [[BB3:%.*]]
10 ; CHECK: bb2.loopexit:
11 ; CHECK-NEXT: br label [[BB2:%.*]]
13 ; CHECK-NEXT: [[TMP0:%.*]] = phi <4 x i32> [ [[TMP8:%.*]], [[BB9:%.*]] ], [ poison, [[BB2_LOOPEXIT:%.*]] ]
14 ; CHECK-NEXT: ret void
16 ; CHECK-NEXT: [[TMP1:%.*]] = phi <2 x i32> [ [[TMP3:%.*]], [[BB6:%.*]] ], [ poison, [[BB1:%.*]] ]
17 ; CHECK-NEXT: [[TMP2:%.*]] = invoke i32 poison(ptr addrspace(1) nonnull poison, i32 0, i32 0, i32 poison) [ "deopt"() ]
18 ; CHECK-NEXT: to label [[BB4:%.*]] unwind label [[BB10:%.*]]
20 ; CHECK-NEXT: br i1 poison, label [[BB11:%.*]], label [[BB5:%.*]]
22 ; CHECK-NEXT: br label [[BB7:%.*]]
24 ; CHECK-NEXT: [[TMP3]] = phi <2 x i32> [ <i32 0, i32 poison>, [[BB8:%.*]] ]
25 ; CHECK-NEXT: br label [[BB3]]
27 ; CHECK-NEXT: [[LOCAL_5_84111:%.*]] = phi i32 [ poison, [[BB8]] ], [ poison, [[BB5]] ]
28 ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <2 x i32> poison, i32 [[LOCAL_5_84111]], i32 0
29 ; CHECK-NEXT: [[TMP5:%.*]] = invoke i32 poison(ptr addrspace(1) nonnull poison, i32 poison, i32 poison, i32 poison) [ "deopt"() ]
30 ; CHECK-NEXT: to label [[BB8]] unwind label [[BB12:%.*]]
32 ; CHECK-NEXT: br i1 poison, label [[BB7]], label [[BB6]]
34 ; CHECK-NEXT: [[INDVARS_IV528799:%.*]] = phi i64 [ poison, [[BB10]] ], [ poison, [[BB12]] ]
35 ; CHECK-NEXT: [[TMP6:%.*]] = phi <2 x i32> [ [[TMP9:%.*]], [[BB10]] ], [ [[TMP10:%.*]], [[BB12]] ]
36 ; CHECK-NEXT: [[TMP7:%.*]] = shufflevector <2 x i32> [[TMP6]], <2 x i32> poison, <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>
37 ; CHECK-NEXT: [[TMP8]] = shufflevector <4 x i32> [[TMP7]], <4 x i32> poison, <4 x i32> <i32 poison, i32 poison, i32 0, i32 1>
38 ; CHECK-NEXT: br label [[BB2]]
40 ; CHECK-NEXT: [[TMP9]] = phi <2 x i32> [ [[TMP1]], [[BB3]] ]
41 ; CHECK-NEXT: [[LANDING_PAD68:%.*]] = landingpad { ptr, i32 }
43 ; CHECK-NEXT: br label [[BB9]]
45 ; CHECK-NEXT: ret void
47 ; CHECK-NEXT: [[TMP10]] = phi <2 x i32> [ [[TMP4]], [[BB7]] ]
48 ; CHECK-NEXT: [[LANDING_PAD149:%.*]] = landingpad { ptr, i32 }
50 ; CHECK-NEXT: br label [[BB9]]
59 %local_8_3681 = phi i32 [ poison, %bb9 ], [ 1, %bb2.loopexit ]
60 %local_2_44 = phi i32 [ poison, %bb9 ], [ poison, %bb2.loopexit ]
61 %local_5_47 = phi i32 [ %local_5_19, %bb9 ], [ poison, %bb2.loopexit ]
62 %local_10_52 = phi i32 [ %local_10_24, %bb9 ], [ poison, %bb2.loopexit ]
66 %local_10_38123 = phi i32 [ %.lcssa773, %bb6 ], [ poison, %bb1 ]
67 %local_5_33118 = phi i32 [ poison, %bb6 ], [ poison, %bb1 ]
68 %0 = invoke i32 poison(ptr addrspace(1) nonnull poison, i32 0, i32 0, i32 poison) [ "deopt"() ]
69 to label %bb4 unwind label %bb10
72 br i1 poison, label %bb11, label %bb5
78 %.lcssa773 = phi i32 [ poison, %bb8 ]
79 %.lcssa770 = phi i32 [ 0, %bb8 ]
83 %local_5_84111 = phi i32 [ poison, %bb8 ], [ poison, %bb5 ]
84 %1 = invoke i32 poison(ptr addrspace(1) nonnull poison, i32 poison, i32 poison, i32 poison) [ "deopt"() ]
85 to label %bb8 unwind label %bb12
88 br i1 poison, label %bb7, label %bb6
91 %indvars.iv528799 = phi i64 [ poison, %bb10 ], [ poison, %bb12 ]
92 %local_5_19 = phi i32 [ %local_5_33118.lcssa, %bb10 ], [ %local_5_84111.lcssa, %bb12 ]
93 %local_10_24 = phi i32 [ %local_10_38123.lcssa, %bb10 ], [ %local_10_89113.lcssa, %bb12 ]
97 %local_10_38123.lcssa = phi i32 [ %local_10_38123, %bb3 ]
98 %local_5_33118.lcssa = phi i32 [ %local_5_33118, %bb3 ]
99 %landing_pad68 = landingpad { ptr, i32 }
107 %local_10_89113.lcssa = phi i32 [ poison, %bb7 ]
108 %local_5_84111.lcssa = phi i32 [ %local_5_84111, %bb7 ]
109 %landing_pad149 = landingpad { ptr, i32 }