1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2 ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64--linux-gnu < %s -mcpu=sapphirerapids | FileCheck %s
4 define void @test(ptr %src, ptr %dst, ptr %c, i64 %arrayidx14.15p) {
5 ; CHECK-LABEL: define void @test(
6 ; CHECK-SAME: ptr [[SRC:%.*]], ptr [[DST:%.*]], ptr [[C:%.*]], i64 [[ARRAYIDX14_15P:%.*]]) #[[ATTR0:[0-9]+]] {
7 ; CHECK-NEXT: [[ENTRY:.*]]:
8 ; CHECK-NEXT: [[ARRAYIDX12_5:%.*]] = getelementptr i8, ptr [[C]], i64 192
9 ; CHECK-NEXT: [[ARRAYIDX14_5:%.*]] = getelementptr i8, ptr [[C]], i64 320
10 ; CHECK-NEXT: [[ARRAYIDX_6:%.*]] = getelementptr i8, ptr [[C]], i64 72
11 ; CHECK-NEXT: [[ARRAYIDX12_6:%.*]] = getelementptr i8, ptr [[C]], i64 200
12 ; CHECK-NEXT: [[ARRAYIDX14_6:%.*]] = getelementptr i8, ptr [[C]], i64 328
13 ; CHECK-NEXT: [[ARRAYIDX_7:%.*]] = getelementptr i8, ptr [[C]], i64 80
14 ; CHECK-NEXT: [[ARRAYIDX12_7:%.*]] = getelementptr i8, ptr [[C]], i64 208
15 ; CHECK-NEXT: [[ARRAYIDX14_7:%.*]] = getelementptr i8, ptr [[C]], i64 336
16 ; CHECK-NEXT: [[ARRAYIDX12_8:%.*]] = getelementptr i8, ptr [[C]], i64 216
17 ; CHECK-NEXT: [[ARRAYIDX14_8:%.*]] = getelementptr i8, ptr [[C]], i64 344
18 ; CHECK-NEXT: [[ARRAYIDX_9:%.*]] = getelementptr i8, ptr [[C]], i64 96
19 ; CHECK-NEXT: [[ARRAYIDX12_9:%.*]] = getelementptr i8, ptr [[C]], i64 224
20 ; CHECK-NEXT: [[ARRAYIDX14_9:%.*]] = getelementptr i8, ptr [[C]], i64 352
21 ; CHECK-NEXT: [[ARRAYIDX_10:%.*]] = getelementptr i8, ptr [[C]], i64 104
22 ; CHECK-NEXT: [[ARRAYIDX12_10:%.*]] = getelementptr i8, ptr [[C]], i64 232
23 ; CHECK-NEXT: [[ARRAYIDX14_10:%.*]] = getelementptr i8, ptr [[C]], i64 360
24 ; CHECK-NEXT: [[ARRAYIDX_11:%.*]] = getelementptr i8, ptr [[C]], i64 112
25 ; CHECK-NEXT: [[ARRAYIDX12_11:%.*]] = getelementptr i8, ptr [[C]], i64 240
26 ; CHECK-NEXT: [[ARRAYIDX14_11:%.*]] = getelementptr i8, ptr [[C]], i64 368
27 ; CHECK-NEXT: [[ARRAYIDX_12:%.*]] = getelementptr i8, ptr [[C]], i64 120
28 ; CHECK-NEXT: [[ARRAYIDX12_12:%.*]] = getelementptr i8, ptr [[C]], i64 248
29 ; CHECK-NEXT: [[ARRAYIDX14_12:%.*]] = getelementptr i8, ptr [[C]], i64 376
30 ; CHECK-NEXT: [[ARRAYIDX14_13:%.*]] = getelementptr i8, ptr [[C]], i64 384
31 ; CHECK-NEXT: [[ARRAYIDX12_5P:%.*]] = load i64, ptr [[ARRAYIDX12_5]], align 8
32 ; CHECK-NEXT: [[ARRAYIDX14_5P:%.*]] = load i64, ptr [[ARRAYIDX14_5]], align 8
33 ; CHECK-NEXT: [[ARRAYIDX_6P:%.*]] = load i64, ptr [[ARRAYIDX_6]], align 8
34 ; CHECK-NEXT: [[ARRAYIDX12_6P:%.*]] = load i64, ptr [[ARRAYIDX12_6]], align 8
35 ; CHECK-NEXT: [[ARRAYIDX14_6P:%.*]] = load i64, ptr [[ARRAYIDX14_6]], align 8
36 ; CHECK-NEXT: [[ARRAYIDX_7P:%.*]] = load i64, ptr [[ARRAYIDX_7]], align 8
37 ; CHECK-NEXT: [[ARRAYIDX12_7P:%.*]] = load i64, ptr [[ARRAYIDX12_7]], align 8
38 ; CHECK-NEXT: [[ARRAYIDX14_7P:%.*]] = load i64, ptr [[ARRAYIDX14_7]], align 8
39 ; CHECK-NEXT: [[ARRAYIDX_8P:%.*]] = load i64, ptr [[C]], align 8
40 ; CHECK-NEXT: [[ARRAYIDX12_8P:%.*]] = load i64, ptr [[ARRAYIDX12_8]], align 8
41 ; CHECK-NEXT: [[ARRAYIDX14_8P:%.*]] = load i64, ptr [[ARRAYIDX14_8]], align 8
42 ; CHECK-NEXT: [[ARRAYIDX_9P:%.*]] = load i64, ptr [[ARRAYIDX_9]], align 8
43 ; CHECK-NEXT: [[ARRAYIDX12_9P:%.*]] = load i64, ptr [[ARRAYIDX12_9]], align 8
44 ; CHECK-NEXT: [[ARRAYIDX14_9P:%.*]] = load i64, ptr [[ARRAYIDX14_9]], align 8
45 ; CHECK-NEXT: [[ARRAYIDX_10P:%.*]] = load i64, ptr [[ARRAYIDX_10]], align 8
46 ; CHECK-NEXT: [[ARRAYIDX12_10P:%.*]] = load i64, ptr [[ARRAYIDX12_10]], align 8
47 ; CHECK-NEXT: [[ARRAYIDX14_10P:%.*]] = load i64, ptr [[ARRAYIDX14_10]], align 8
48 ; CHECK-NEXT: [[ARRAYIDX_11P:%.*]] = load i64, ptr [[ARRAYIDX_11]], align 8
49 ; CHECK-NEXT: [[ARRAYIDX12_11P:%.*]] = load i64, ptr [[ARRAYIDX12_11]], align 8
50 ; CHECK-NEXT: [[ARRAYIDX14_11P:%.*]] = load i64, ptr [[ARRAYIDX14_11]], align 8
51 ; CHECK-NEXT: [[ARRAYIDX_12P:%.*]] = load i64, ptr [[ARRAYIDX_12]], align 8
52 ; CHECK-NEXT: [[ARRAYIDX12_12P:%.*]] = load i64, ptr [[ARRAYIDX12_12]], align 8
53 ; CHECK-NEXT: [[ARRAYIDX14_12P:%.*]] = load i64, ptr [[ARRAYIDX14_12]], align 8
54 ; CHECK-NEXT: [[ARRAYIDX_13P:%.*]] = load i64, ptr [[SRC]], align 8
55 ; CHECK-NEXT: [[ARRAYIDX14_13P:%.*]] = load i64, ptr [[ARRAYIDX14_13]], align 8
56 ; CHECK-NEXT: br label %[[LAND_LHS_TRUE137:.*]]
57 ; CHECK: [[LAND_LHS_TRUE137]]:
58 ; CHECK-NEXT: [[TMP0:%.*]] = phi i64 [ 0, %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_15P]], %[[ENTRY]] ]
59 ; CHECK-NEXT: [[TMP1:%.*]] = phi i64 [ 0, %[[LAND_LHS_TRUE137]] ], [ 1, %[[ENTRY]] ]
60 ; CHECK-NEXT: [[TMP2:%.*]] = phi i64 [ 1, %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ]
61 ; CHECK-NEXT: [[TMP3:%.*]] = phi i64 [ [[TMP0]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ]
62 ; CHECK-NEXT: [[TMP4:%.*]] = phi i64 [ [[TMP1]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ]
63 ; CHECK-NEXT: [[TMP5:%.*]] = phi i64 [ [[TMP2]], %[[LAND_LHS_TRUE137]] ], [ 0, %[[ENTRY]] ]
64 ; CHECK-NEXT: [[TMP6:%.*]] = phi i64 [ [[TMP3]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_13P]], %[[ENTRY]] ]
65 ; CHECK-NEXT: [[TMP7:%.*]] = phi i64 [ [[TMP4]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_13P]], %[[ENTRY]] ]
66 ; CHECK-NEXT: [[TMP8:%.*]] = phi i64 [ [[TMP5]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_13P]], %[[ENTRY]] ]
67 ; CHECK-NEXT: [[TMP9:%.*]] = phi i64 [ [[TMP6]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_12P]], %[[ENTRY]] ]
68 ; CHECK-NEXT: [[TMP10:%.*]] = phi i64 [ [[TMP7]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_12P]], %[[ENTRY]] ]
69 ; CHECK-NEXT: [[TMP11:%.*]] = phi i64 [ [[TMP8]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_12P]], %[[ENTRY]] ]
70 ; CHECK-NEXT: [[TMP12:%.*]] = phi i64 [ [[TMP9]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_11P]], %[[ENTRY]] ]
71 ; CHECK-NEXT: [[TMP13:%.*]] = phi i64 [ [[TMP10]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_11P]], %[[ENTRY]] ]
72 ; CHECK-NEXT: [[TMP14:%.*]] = phi i64 [ [[TMP11]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_11P]], %[[ENTRY]] ]
73 ; CHECK-NEXT: [[TMP15:%.*]] = phi i64 [ [[TMP12]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_10P]], %[[ENTRY]] ]
74 ; CHECK-NEXT: [[TMP16:%.*]] = phi i64 [ [[TMP13]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_10P]], %[[ENTRY]] ]
75 ; CHECK-NEXT: [[TMP17:%.*]] = phi i64 [ [[TMP14]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_10P]], %[[ENTRY]] ]
76 ; CHECK-NEXT: [[TMP18:%.*]] = phi i64 [ [[TMP15]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_9P]], %[[ENTRY]] ]
77 ; CHECK-NEXT: [[TMP19:%.*]] = phi i64 [ [[TMP16]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_9P]], %[[ENTRY]] ]
78 ; CHECK-NEXT: [[TMP20:%.*]] = phi i64 [ [[TMP17]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_9P]], %[[ENTRY]] ]
79 ; CHECK-NEXT: [[TMP21:%.*]] = phi i64 [ [[TMP18]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_8P]], %[[ENTRY]] ]
80 ; CHECK-NEXT: [[TMP22:%.*]] = phi i64 [ [[TMP19]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_8P]], %[[ENTRY]] ]
81 ; CHECK-NEXT: [[TMP23:%.*]] = phi i64 [ [[TMP20]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_8P]], %[[ENTRY]] ]
82 ; CHECK-NEXT: [[TMP24:%.*]] = phi i64 [ [[TMP21]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_7P]], %[[ENTRY]] ]
83 ; CHECK-NEXT: [[TMP25:%.*]] = phi i64 [ [[TMP22]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_7P]], %[[ENTRY]] ]
84 ; CHECK-NEXT: [[TMP26:%.*]] = phi i64 [ [[TMP23]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_7P]], %[[ENTRY]] ]
85 ; CHECK-NEXT: [[TMP27:%.*]] = phi i64 [ [[TMP24]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_6P]], %[[ENTRY]] ]
86 ; CHECK-NEXT: [[TMP28:%.*]] = phi i64 [ [[TMP25]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_6P]], %[[ENTRY]] ]
87 ; CHECK-NEXT: [[TMP29:%.*]] = phi i64 [ [[TMP26]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX_6P]], %[[ENTRY]] ]
88 ; CHECK-NEXT: [[TMP30:%.*]] = phi i64 [ [[TMP27]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX14_5P]], %[[ENTRY]] ]
89 ; CHECK-NEXT: [[TMP31:%.*]] = phi i64 [ [[TMP28]], %[[LAND_LHS_TRUE137]] ], [ [[ARRAYIDX12_5P]], %[[ENTRY]] ]
90 ; CHECK-NEXT: store i64 [[TMP31]], ptr [[DST]], align 8
91 ; CHECK-NEXT: store i64 [[TMP30]], ptr [[SRC]], align 8
92 ; CHECK-NEXT: store i64 [[TMP29]], ptr [[DST]], align 8
93 ; CHECK-NEXT: br label %[[LAND_LHS_TRUE137]]
96 %arrayidx12.5 = getelementptr i8, ptr %c, i64 192
97 %arrayidx14.5 = getelementptr i8, ptr %c, i64 320
98 %arrayidx.6 = getelementptr i8, ptr %c, i64 72
99 %arrayidx12.6 = getelementptr i8, ptr %c, i64 200
100 %arrayidx14.6 = getelementptr i8, ptr %c, i64 328
101 %arrayidx.7 = getelementptr i8, ptr %c, i64 80
102 %arrayidx12.7 = getelementptr i8, ptr %c, i64 208
103 %arrayidx14.7 = getelementptr i8, ptr %c, i64 336
104 %arrayidx12.8 = getelementptr i8, ptr %c, i64 216
105 %arrayidx14.8 = getelementptr i8, ptr %c, i64 344
106 %arrayidx.9 = getelementptr i8, ptr %c, i64 96
107 %arrayidx12.9 = getelementptr i8, ptr %c, i64 224
108 %arrayidx14.9 = getelementptr i8, ptr %c, i64 352
109 %arrayidx.10 = getelementptr i8, ptr %c, i64 104
110 %arrayidx12.10 = getelementptr i8, ptr %c, i64 232
111 %arrayidx14.10 = getelementptr i8, ptr %c, i64 360
112 %arrayidx.11 = getelementptr i8, ptr %c, i64 112
113 %arrayidx12.11 = getelementptr i8, ptr %c, i64 240
114 %arrayidx14.11 = getelementptr i8, ptr %c, i64 368
115 %arrayidx.12 = getelementptr i8, ptr %c, i64 120
116 %arrayidx12.12 = getelementptr i8, ptr %c, i64 248
117 %arrayidx14.12 = getelementptr i8, ptr %c, i64 376
118 %arrayidx14.13 = getelementptr i8, ptr %c, i64 384
119 %arrayidx12.5p = load i64, ptr %arrayidx12.5, align 8
120 %arrayidx14.5p = load i64, ptr %arrayidx14.5, align 8
121 %arrayidx.6p = load i64, ptr %arrayidx.6, align 8
122 %arrayidx12.6p = load i64, ptr %arrayidx12.6, align 8
123 %arrayidx14.6p = load i64, ptr %arrayidx14.6, align 8
124 %arrayidx.7p = load i64, ptr %arrayidx.7, align 8
125 %arrayidx12.7p = load i64, ptr %arrayidx12.7, align 8
126 %arrayidx14.7p = load i64, ptr %arrayidx14.7, align 8
127 %arrayidx.8p = load i64, ptr %c, align 8
128 %arrayidx12.8p = load i64, ptr %arrayidx12.8, align 8
129 %arrayidx14.8p = load i64, ptr %arrayidx14.8, align 8
130 %arrayidx.9p = load i64, ptr %arrayidx.9, align 8
131 %arrayidx12.9p = load i64, ptr %arrayidx12.9, align 8
132 %arrayidx14.9p = load i64, ptr %arrayidx14.9, align 8
133 %arrayidx.10p = load i64, ptr %arrayidx.10, align 8
134 %arrayidx12.10p = load i64, ptr %arrayidx12.10, align 8
135 %arrayidx14.10p = load i64, ptr %arrayidx14.10, align 8
136 %arrayidx.11p = load i64, ptr %arrayidx.11, align 8
137 %arrayidx12.11p = load i64, ptr %arrayidx12.11, align 8
138 %arrayidx14.11p = load i64, ptr %arrayidx14.11, align 8
139 %arrayidx.12p = load i64, ptr %arrayidx.12, align 8
140 %arrayidx12.12p = load i64, ptr %arrayidx12.12, align 8
141 %arrayidx14.12p = load i64, ptr %arrayidx14.12, align 8
142 %arrayidx.13p = load i64, ptr %src, align 8
143 %arrayidx14.13p = load i64, ptr %arrayidx14.13, align 8
144 br label %land.lhs.true137
147 %0 = phi i64 [ 0, %land.lhs.true137 ], [ %arrayidx14.15p, %entry ]
148 %1 = phi i64 [ 0, %land.lhs.true137 ], [ 1, %entry ]
149 %2 = phi i64 [ 1, %land.lhs.true137 ], [ 0, %entry ]
150 %3 = phi i64 [ %0, %land.lhs.true137 ], [ 0, %entry ]
151 %4 = phi i64 [ %1, %land.lhs.true137 ], [ 0, %entry ]
152 %5 = phi i64 [ %2, %land.lhs.true137 ], [ 0, %entry ]
153 %6 = phi i64 [ %3, %land.lhs.true137 ], [ %arrayidx14.13p, %entry ]
154 %7 = phi i64 [ %4, %land.lhs.true137 ], [ %arrayidx.13p, %entry ]
155 %8 = phi i64 [ %5, %land.lhs.true137 ], [ %arrayidx.13p, %entry ]
156 %9 = phi i64 [ %6, %land.lhs.true137 ], [ %arrayidx14.12p, %entry ]
157 %10 = phi i64 [ %7, %land.lhs.true137 ], [ %arrayidx12.12p, %entry ]
158 %11 = phi i64 [ %8, %land.lhs.true137 ], [ %arrayidx.12p, %entry ]
159 %12 = phi i64 [ %9, %land.lhs.true137 ], [ %arrayidx14.11p, %entry ]
160 %13 = phi i64 [ %10, %land.lhs.true137 ], [ %arrayidx12.11p, %entry ]
161 %14 = phi i64 [ %11, %land.lhs.true137 ], [ %arrayidx.11p, %entry ]
162 %15 = phi i64 [ %12, %land.lhs.true137 ], [ %arrayidx14.10p, %entry ]
163 %16 = phi i64 [ %13, %land.lhs.true137 ], [ %arrayidx12.10p, %entry ]
164 %17 = phi i64 [ %14, %land.lhs.true137 ], [ %arrayidx.10p, %entry ]
165 %18 = phi i64 [ %15, %land.lhs.true137 ], [ %arrayidx14.9p, %entry ]
166 %19 = phi i64 [ %16, %land.lhs.true137 ], [ %arrayidx12.9p, %entry ]
167 %20 = phi i64 [ %17, %land.lhs.true137 ], [ %arrayidx.9p, %entry ]
168 %21 = phi i64 [ %18, %land.lhs.true137 ], [ %arrayidx14.8p, %entry ]
169 %22 = phi i64 [ %19, %land.lhs.true137 ], [ %arrayidx12.8p, %entry ]
170 %23 = phi i64 [ %20, %land.lhs.true137 ], [ %arrayidx.8p, %entry ]
171 %24 = phi i64 [ %21, %land.lhs.true137 ], [ %arrayidx14.7p, %entry ]
172 %25 = phi i64 [ %22, %land.lhs.true137 ], [ %arrayidx12.7p, %entry ]
173 %26 = phi i64 [ %23, %land.lhs.true137 ], [ %arrayidx.7p, %entry ]
174 %27 = phi i64 [ %24, %land.lhs.true137 ], [ %arrayidx14.6p, %entry ]
175 %28 = phi i64 [ %25, %land.lhs.true137 ], [ %arrayidx12.6p, %entry ]
176 %29 = phi i64 [ %26, %land.lhs.true137 ], [ %arrayidx.6p, %entry ]
177 %30 = phi i64 [ %27, %land.lhs.true137 ], [ %arrayidx14.5p, %entry ]
178 %31 = phi i64 [ %28, %land.lhs.true137 ], [ %arrayidx12.5p, %entry ]
179 store i64 %31, ptr %dst, align 8
180 store i64 %30, ptr %src, align 8
181 store i64 %29, ptr %dst, align 8
182 br label %land.lhs.true137