1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=slp-vectorizer,verify -slp-threshold=-99999 -mtriple=aarch64-unknown-linux -S -pass-remarks-output=%t | FileCheck %s
3 ; RUN: FileCheck --input-file=%t --check-prefix=YAML %s
5 ; YAML-LABEL: --- !Passed
6 ; YAML-NEXT: Pass: slp-vectorizer
7 ; YAML-NEXT: Name: VectorizedList
8 ; YAML-NEXT: Function: foo
10 ; YAML-NEXT: - String: 'SLP vectorized with cost '
11 ; YAML-NEXT: - Cost: '2'
12 ; YAML-NEXT: - String: ' and with tree size '
13 ; YAML-NEXT: - TreeSize: '2'
15 ; YAML-LABEL: --- !Passed
16 ; YAML-NEXT: Pass: slp-vectorizer
17 ; YAML-NEXT: Name: VectorizedList
18 ; YAML-NEXT: Function: foo
20 ; YAML-NEXT: - String: 'SLP vectorized with cost '
21 ; YAML-NEXT: - Cost: '0'
22 ; YAML-NEXT: - String: ' and with tree size '
23 ; YAML-NEXT: - TreeSize: '3'
25 ; YAML-LABEL: --- !Passed
26 ; YAML-NEXT: Pass: slp-vectorizer
27 ; YAML-NEXT: Name: VectorizedList
28 ; YAML-NEXT: Function: foo
30 ; YAML-NEXT: - String: 'SLP vectorized with cost '
31 ; YAML-NEXT: - Cost: '2'
32 ; YAML-NEXT: - String: ' and with tree size '
33 ; YAML-NEXT: - TreeSize: '9'
35 define void @foo() personality ptr @bar {
38 ; CHECK-NEXT: br label [[BB3:%.*]]
39 ; CHECK: bb2.loopexit:
40 ; CHECK-NEXT: br label [[BB2:%.*]]
42 ; CHECK-NEXT: [[TMP0:%.*]] = phi <2 x i64> [ poison, [[BB9:%.*]] ], [ poison, [[BB2_LOOPEXIT:%.*]] ]
43 ; CHECK-NEXT: [[TMP1:%.*]] = phi <2 x i64> [ [[TMP7:%.*]], [[BB9]] ], [ poison, [[BB2_LOOPEXIT]] ]
44 ; CHECK-NEXT: ret void
46 ; CHECK-NEXT: [[TMP2:%.*]] = phi <2 x i64> [ [[TMP4:%.*]], [[BB6:%.*]] ], [ poison, [[BB1:%.*]] ]
47 ; CHECK-NEXT: [[TMP3:%.*]] = invoke i64 poison(ptr addrspace(1) nonnull poison, i64 0, i64 0, i64 poison) [ "deopt"() ]
48 ; CHECK-NEXT: to label [[BB4:%.*]] unwind label [[BB10:%.*]]
50 ; CHECK-NEXT: br i1 poison, label [[BB11:%.*]], label [[BB5:%.*]]
52 ; CHECK-NEXT: br label [[BB7:%.*]]
54 ; CHECK-NEXT: [[TMP4]] = phi <2 x i64> [ <i64 0, i64 poison>, [[BB8:%.*]] ]
55 ; CHECK-NEXT: br label [[BB3]]
57 ; CHECK-NEXT: [[LOCAL_5_84111:%.*]] = phi i64 [ poison, [[BB8]] ], [ poison, [[BB5]] ]
58 ; CHECK-NEXT: [[TMP5:%.*]] = insertelement <2 x i64> poison, i64 [[LOCAL_5_84111]], i32 0
59 ; CHECK-NEXT: [[TMP6:%.*]] = invoke i64 poison(ptr addrspace(1) nonnull poison, i64 poison, i64 poison, i64 poison) [ "deopt"() ]
60 ; CHECK-NEXT: to label [[BB8]] unwind label [[BB12:%.*]]
62 ; CHECK-NEXT: br i1 poison, label [[BB7]], label [[BB6]]
64 ; CHECK-NEXT: [[INDVARS_IV528799:%.*]] = phi i64 [ poison, [[BB10]] ], [ poison, [[BB12]] ]
65 ; CHECK-NEXT: [[TMP7]] = phi <2 x i64> [ [[TMP8:%.*]], [[BB10]] ], [ [[TMP9:%.*]], [[BB12]] ]
66 ; CHECK-NEXT: br label [[BB2]]
68 ; CHECK-NEXT: [[TMP8]] = phi <2 x i64> [ [[TMP2]], [[BB3]] ]
69 ; CHECK-NEXT: [[LANDING_PAD68:%.*]] = landingpad { ptr, i64 }
71 ; CHECK-NEXT: br label [[BB9]]
73 ; CHECK-NEXT: ret void
75 ; CHECK-NEXT: [[TMP9]] = phi <2 x i64> [ [[TMP5]], [[BB7]] ]
76 ; CHECK-NEXT: [[LANDING_PAD149:%.*]] = landingpad { ptr, i64 }
78 ; CHECK-NEXT: br label [[BB9]]
87 %local_8_3681 = phi i64 [ poison, %bb9 ], [ 1, %bb2.loopexit ]
88 %local_2_44 = phi i64 [ poison, %bb9 ], [ poison, %bb2.loopexit ]
89 %local_5_47 = phi i64 [ %local_5_19, %bb9 ], [ poison, %bb2.loopexit ]
90 %local_10_52 = phi i64 [ %local_10_24, %bb9 ], [ poison, %bb2.loopexit ]
94 %local_10_38123 = phi i64 [ %.lcssa773, %bb6 ], [ poison, %bb1 ]
95 %local_5_33118 = phi i64 [ poison, %bb6 ], [ poison, %bb1 ]
96 %0 = invoke i64 poison(ptr addrspace(1) nonnull poison, i64 0, i64 0, i64 poison) [ "deopt"() ]
97 to label %bb4 unwind label %bb10
100 br i1 poison, label %bb11, label %bb5
106 %.lcssa773 = phi i64 [ poison, %bb8 ]
107 %.lcssa770 = phi i64 [ 0, %bb8 ]
111 %local_5_84111 = phi i64 [ poison, %bb8 ], [ poison, %bb5 ]
112 %1 = invoke i64 poison(ptr addrspace(1) nonnull poison, i64 poison, i64 poison, i64 poison) [ "deopt"() ]
113 to label %bb8 unwind label %bb12
116 br i1 poison, label %bb7, label %bb6
119 %indvars.iv528799 = phi i64 [ poison, %bb10 ], [ poison, %bb12 ]
120 %local_5_19 = phi i64 [ %local_5_33118.lcssa, %bb10 ], [ %local_5_84111.lcssa, %bb12 ]
121 %local_10_24 = phi i64 [ %local_10_38123.lcssa, %bb10 ], [ %local_10_89113.lcssa, %bb12 ]
125 %local_10_38123.lcssa = phi i64 [ %local_10_38123, %bb3 ]
126 %local_5_33118.lcssa = phi i64 [ %local_5_33118, %bb3 ]
127 %landing_pad68 = landingpad { ptr, i64 }
135 %local_10_89113.lcssa = phi i64 [ poison, %bb7 ]
136 %local_5_84111.lcssa = phi i64 [ %local_5_84111, %bb7 ]
137 %landing_pad149 = landingpad { ptr, i64 }