Skip to content

Commit 1172a8a

Browse files
committed
[NFC] Clean up tests in test/Transforms/LoopVectorize/assume.ll
The tests previously had lots of unnecessary CHECK lines, where all we really need to check is the presence (or absence) of the assume intrinsic and the correct input operands. Differential Revision: https://reviews.llvm.org/D107157
1 parent 5181be3 commit 1172a8a

File tree

1 file changed

+18
-209
lines changed

1 file changed

+18
-209
lines changed

llvm/test/Transforms/LoopVectorize/assume.ll

Lines changed: 18 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,23 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
21
; RUN: opt < %s -loop-vectorize -force-vector-width=2 -force-vector-interleave=2 -S | FileCheck %s
32

43
define void @test1(float* noalias nocapture %a, float* noalias nocapture readonly %b) {
54
; CHECK-LABEL: @test1(
6-
; CHECK-NEXT: entry:
7-
; CHECK-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
8-
; CHECK: vector.ph:
9-
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
105
; CHECK: vector.body:
11-
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
12-
; CHECK-NEXT: [[TMP0:%.*]] = add i64 [[INDEX]], 0
13-
; CHECK-NEXT: [[TMP1:%.*]] = add i64 [[INDEX]], 2
14-
; CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds float, float* [[B:%.*]], i64 [[TMP0]]
15-
; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds float, float* [[B]], i64 [[TMP1]]
16-
; CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds float, float* [[TMP2]], i32 0
17-
; CHECK-NEXT: [[TMP5:%.*]] = bitcast float* [[TMP4]] to <2 x float>*
18-
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <2 x float>, <2 x float>* [[TMP5]], align 4
19-
; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds float, float* [[TMP2]], i32 2
20-
; CHECK-NEXT: [[TMP7:%.*]] = bitcast float* [[TMP6]] to <2 x float>*
21-
; CHECK-NEXT: [[WIDE_LOAD1:%.*]] = load <2 x float>, <2 x float>* [[TMP7]], align 4
22-
; CHECK-NEXT: [[TMP8:%.*]] = fcmp ogt <2 x float> [[WIDE_LOAD]], <float 1.000000e+02, float 1.000000e+02>
23-
; CHECK-NEXT: [[TMP9:%.*]] = fcmp ogt <2 x float> [[WIDE_LOAD1]], <float 1.000000e+02, float 1.000000e+02>
24-
; CHECK-NEXT: [[TMP10:%.*]] = extractelement <2 x i1> [[TMP8]], i32 0
25-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP10]])
26-
; CHECK-NEXT: [[TMP11:%.*]] = extractelement <2 x i1> [[TMP8]], i32 1
27-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP11]])
28-
; CHECK-NEXT: [[TMP12:%.*]] = extractelement <2 x i1> [[TMP9]], i32 0
29-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP12]])
30-
; CHECK-NEXT: [[TMP13:%.*]] = extractelement <2 x i1> [[TMP9]], i32 1
31-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP13]])
32-
; CHECK-NEXT: [[TMP14:%.*]] = fadd <2 x float> [[WIDE_LOAD]], <float 1.000000e+00, float 1.000000e+00>
33-
; CHECK-NEXT: [[TMP15:%.*]] = fadd <2 x float> [[WIDE_LOAD1]], <float 1.000000e+00, float 1.000000e+00>
34-
; CHECK-NEXT: [[TMP16:%.*]] = getelementptr inbounds float, float* [[A:%.*]], i64 [[TMP0]]
35-
; CHECK-NEXT: [[TMP17:%.*]] = getelementptr inbounds float, float* [[A]], i64 [[TMP1]]
36-
; CHECK-NEXT: [[TMP18:%.*]] = getelementptr inbounds float, float* [[TMP16]], i32 0
37-
; CHECK-NEXT: [[TMP19:%.*]] = bitcast float* [[TMP18]] to <2 x float>*
38-
; CHECK-NEXT: store <2 x float> [[TMP14]], <2 x float>* [[TMP19]], align 4
39-
; CHECK-NEXT: [[TMP20:%.*]] = getelementptr inbounds float, float* [[TMP16]], i32 2
40-
; CHECK-NEXT: [[TMP21:%.*]] = bitcast float* [[TMP20]] to <2 x float>*
41-
; CHECK-NEXT: store <2 x float> [[TMP15]], <2 x float>* [[TMP21]], align 4
42-
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
43-
; CHECK-NEXT: [[TMP22:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1600
44-
; CHECK-NEXT: br i1 [[TMP22]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
45-
; CHECK: middle.block:
46-
; CHECK-NEXT: [[CMP_N:%.*]] = icmp eq i64 1600, 1600
47-
; CHECK-NEXT: br i1 [[CMP_N]], label [[FOR_END:%.*]], label [[SCALAR_PH]]
48-
; CHECK: scalar.ph:
49-
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ 1600, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ]
50-
; CHECK-NEXT: br label [[FOR_BODY:%.*]]
51-
; CHECK: for.body:
52-
; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ]
53-
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[B]], i64 [[INDVARS_IV]]
54-
; CHECK-NEXT: [[TMP23:%.*]] = load float, float* [[ARRAYIDX]], align 4
55-
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ogt float [[TMP23]], 1.000000e+02
56-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP1]])
57-
; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP23]], 1.000000e+00
58-
; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds float, float* [[A]], i64 [[INDVARS_IV]]
59-
; CHECK-NEXT: store float [[ADD]], float* [[ARRAYIDX5]], align 4
60-
; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
61-
; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[INDVARS_IV]], 1599
62-
; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_END]], label [[FOR_BODY]], !llvm.loop [[LOOP2:![0-9]+]]
63-
; CHECK: for.end:
64-
; CHECK-NEXT: ret void
65-
;
6+
; CHECK: [[WIDE_LOAD:%.*]] = load <2 x float>, <2 x float>* {{.*}}, align 4
7+
; CHECK: [[WIDE_LOAD1:%.*]] = load <2 x float>, <2 x float>* {{.*}}, align 4
8+
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ogt <2 x float> [[WIDE_LOAD]], <float 1.000000e+02, float 1.000000e+02>
9+
; CHECK-NEXT: [[TMP2:%.*]] = fcmp ogt <2 x float> [[WIDE_LOAD1]], <float 1.000000e+02, float 1.000000e+02>
10+
; CHECK-NEXT: [[TMP3:%.*]] = extractelement <2 x i1> [[TMP1]], i32 0
11+
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP3]])
12+
; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i1> [[TMP1]], i32 1
13+
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP4]])
14+
; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i1> [[TMP2]], i32 0
15+
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP5]])
16+
; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1
17+
; CHECK-NEXT: tail call void @llvm.assume(i1 [[TMP6]])
6618
entry:
6719
br label %for.body
6820

69-
7021
for.body: ; preds = %for.body, %entry
7122
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
7223
%arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv
@@ -92,86 +43,19 @@ attributes #0 = { nounwind willreturn }
9243

9344
define void @test2(%struct.data* nocapture readonly %d) {
9445
; CHECK-LABEL: @test2(
95-
; CHECK-NEXT: entry:
96-
; CHECK-NEXT: [[B:%.*]] = getelementptr inbounds [[STRUCT_DATA:%.*]], %struct.data* [[D:%.*]], i64 0, i32 1
97-
; CHECK-NEXT: [[TMP0:%.*]] = load float*, float** [[B]], align 8
98-
; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[TMP0]] to i8*
99-
; CHECK-NEXT: [[PTRINT:%.*]] = ptrtoint float* [[TMP0]] to i64
100-
; CHECK-NEXT: [[MASKEDPTR:%.*]] = and i64 [[PTRINT]], 31
101-
; CHECK-NEXT: [[MASKCOND:%.*]] = icmp eq i64 [[MASKEDPTR]], 0
102-
; CHECK-NEXT: [[A:%.*]] = getelementptr inbounds [[STRUCT_DATA]], %struct.data* [[D]], i64 0, i32 0
103-
; CHECK-NEXT: [[TMP2:%.*]] = load float*, float** [[A]], align 8
104-
; CHECK-NEXT: [[TMP3:%.*]] = bitcast float* [[TMP2]] to i8*
105-
; CHECK-NEXT: [[PTRINT2:%.*]] = ptrtoint float* [[TMP2]] to i64
106-
; CHECK-NEXT: [[MASKEDPTR3:%.*]] = and i64 [[PTRINT2]], 31
107-
; CHECK-NEXT: [[MASKCOND4:%.*]] = icmp eq i64 [[MASKEDPTR3]], 0
108-
; CHECK-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_MEMCHECK:%.*]]
109-
; CHECK: vector.memcheck:
110-
; CHECK-NEXT: [[SCEVGEP:%.*]] = getelementptr float, float* [[TMP2]], i64 1600
111-
; CHECK-NEXT: [[SCEVGEP1:%.*]] = bitcast float* [[SCEVGEP]] to i8*
112-
; CHECK-NEXT: [[SCEVGEP2:%.*]] = getelementptr float, float* [[TMP0]], i64 1600
113-
; CHECK-NEXT: [[SCEVGEP23:%.*]] = bitcast float* [[SCEVGEP2]] to i8*
114-
; CHECK-NEXT: [[BOUND0:%.*]] = icmp ult i8* [[TMP3]], [[SCEVGEP23]]
115-
; CHECK-NEXT: [[BOUND1:%.*]] = icmp ult i8* [[TMP1]], [[SCEVGEP1]]
116-
; CHECK-NEXT: [[FOUND_CONFLICT:%.*]] = and i1 [[BOUND0]], [[BOUND1]]
117-
; CHECK-NEXT: [[MEMCHECK_CONFLICT:%.*]] = and i1 [[FOUND_CONFLICT]], true
118-
; CHECK-NEXT: br i1 [[MEMCHECK_CONFLICT]], label [[SCALAR_PH]], label [[VECTOR_PH:%.*]]
119-
; CHECK: vector.ph:
120-
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
46+
; CHECK: entry:
47+
; CHECK: [[MASKCOND:%.*]] = icmp eq i64 %maskedptr, 0
48+
; CHECK: [[MASKCOND4:%.*]] = icmp eq i64 %maskedptr3, 0
12149
; CHECK: vector.body:
122-
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
123-
; CHECK-NEXT: [[TMP4:%.*]] = add i64 [[INDEX]], 0
124-
; CHECK-NEXT: [[TMP5:%.*]] = add i64 [[INDEX]], 2
125-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND]])
50+
; CHECK: tail call void @llvm.assume(i1 [[MASKCOND]])
12651
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND]])
12752
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND]])
12853
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND]])
129-
; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds float, float* [[TMP0]], i64 [[TMP4]]
130-
; CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds float, float* [[TMP0]], i64 [[TMP5]]
131-
; CHECK-NEXT: [[TMP8:%.*]] = getelementptr inbounds float, float* [[TMP6]], i32 0
132-
; CHECK-NEXT: [[TMP9:%.*]] = bitcast float* [[TMP8]] to <2 x float>*
133-
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <2 x float>, <2 x float>* [[TMP9]], align 4, !alias.scope !4
134-
; CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds float, float* [[TMP6]], i32 2
135-
; CHECK-NEXT: [[TMP11:%.*]] = bitcast float* [[TMP10]] to <2 x float>*
136-
; CHECK-NEXT: [[WIDE_LOAD4:%.*]] = load <2 x float>, <2 x float>* [[TMP11]], align 4, !alias.scope !4
137-
; CHECK-NEXT: [[TMP12:%.*]] = fadd <2 x float> [[WIDE_LOAD]], <float 1.000000e+00, float 1.000000e+00>
138-
; CHECK-NEXT: [[TMP13:%.*]] = fadd <2 x float> [[WIDE_LOAD4]], <float 1.000000e+00, float 1.000000e+00>
54+
; CHECK: tail call void @llvm.assume(i1 [[MASKCOND4]])
13955
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND4]])
14056
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND4]])
14157
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND4]])
142-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND4]])
143-
; CHECK-NEXT: [[TMP14:%.*]] = getelementptr inbounds float, float* [[TMP2]], i64 [[TMP4]]
144-
; CHECK-NEXT: [[TMP15:%.*]] = getelementptr inbounds float, float* [[TMP2]], i64 [[TMP5]]
145-
; CHECK-NEXT: [[TMP16:%.*]] = getelementptr inbounds float, float* [[TMP14]], i32 0
146-
; CHECK-NEXT: [[TMP17:%.*]] = bitcast float* [[TMP16]] to <2 x float>*
147-
; CHECK-NEXT: store <2 x float> [[TMP12]], <2 x float>* [[TMP17]], align 4, !alias.scope !7, !noalias !4
148-
; CHECK-NEXT: [[TMP18:%.*]] = getelementptr inbounds float, float* [[TMP14]], i32 2
149-
; CHECK-NEXT: [[TMP19:%.*]] = bitcast float* [[TMP18]] to <2 x float>*
150-
; CHECK-NEXT: store <2 x float> [[TMP13]], <2 x float>* [[TMP19]], align 4, !alias.scope !7, !noalias !4
151-
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
152-
; CHECK-NEXT: [[TMP20:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1600
153-
; CHECK-NEXT: br i1 [[TMP20]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP9:![0-9]+]]
154-
; CHECK: middle.block:
155-
; CHECK-NEXT: [[CMP_N:%.*]] = icmp eq i64 1600, 1600
156-
; CHECK-NEXT: br i1 [[CMP_N]], label [[FOR_END:%.*]], label [[SCALAR_PH]]
157-
; CHECK: scalar.ph:
158-
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ 1600, [[MIDDLE_BLOCK]] ], [ 0, [[ENTRY:%.*]] ], [ 0, [[VECTOR_MEMCHECK]] ]
159-
; CHECK-NEXT: br label [[FOR_BODY:%.*]]
16058
; CHECK: for.body:
161-
; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ]
162-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND]])
163-
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[TMP0]], i64 [[INDVARS_IV]]
164-
; CHECK-NEXT: [[TMP21:%.*]] = load float, float* [[ARRAYIDX]], align 4
165-
; CHECK-NEXT: [[ADD:%.*]] = fadd float [[TMP21]], 1.000000e+00
166-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[MASKCOND4]])
167-
; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds float, float* [[TMP2]], i64 [[INDVARS_IV]]
168-
; CHECK-NEXT: store float [[ADD]], float* [[ARRAYIDX5]], align 4
169-
; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
170-
; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[INDVARS_IV]], 1599
171-
; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_END]], label [[FOR_BODY]], !llvm.loop [[LOOP10:![0-9]+]]
172-
; CHECK: for.end:
173-
; CHECK-NEXT: ret void
174-
;
17559
entry:
17660
%b = getelementptr inbounds %struct.data, %struct.data* %d, i64 0, i32 1
17761
%0 = load float*, float** %b, align 8
@@ -209,84 +93,9 @@ for.end: ; preds = %for.body
20993
define void @predicated_assume(float* noalias nocapture readonly %a, float* noalias nocapture %b, i32 %n) {
21094
; Check that the vector.body does not contain any assumes.
21195
; CHECK-LABEL: @predicated_assume(
212-
; CHECK-NEXT: entry:
213-
; CHECK-NEXT: [[CMP15:%.*]] = icmp eq i32 [[N:%.*]], 0
214-
; CHECK-NEXT: br i1 [[CMP15]], label [[FOR_COND_CLEANUP:%.*]], label [[FOR_BODY_PREHEADER:%.*]]
215-
; CHECK: for.body.preheader:
216-
; CHECK-NEXT: [[TMP0:%.*]] = zext i32 [[N]] to i64
217-
; CHECK-NEXT: [[MIN_ITERS_CHECK:%.*]] = icmp ult i64 [[TMP0]], 4
218-
; CHECK-NEXT: br i1 [[MIN_ITERS_CHECK]], label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
219-
; CHECK: vector.ph:
220-
; CHECK-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[TMP0]], 4
221-
; CHECK-NEXT: [[N_VEC:%.*]] = sub i64 [[TMP0]], [[N_MOD_VF]]
222-
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
22396
; CHECK: vector.body:
224-
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
225-
; CHECK-NEXT: [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 0, i64 1>, [[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], [[VECTOR_BODY]] ]
226-
; CHECK-NEXT: [[STEP_ADD:%.*]] = add <2 x i64> [[VEC_IND]], <i64 2, i64 2>
227-
; CHECK-NEXT: [[TMP1:%.*]] = add i64 [[INDEX]], 0
228-
; CHECK-NEXT: [[TMP2:%.*]] = add i64 [[INDEX]], 1
229-
; CHECK-NEXT: [[TMP3:%.*]] = add i64 [[INDEX]], 2
230-
; CHECK-NEXT: [[TMP4:%.*]] = add i64 [[INDEX]], 3
231-
; CHECK-NEXT: [[TMP5:%.*]] = icmp ult <2 x i64> [[VEC_IND]], <i64 495616, i64 495616>
232-
; CHECK-NEXT: [[TMP6:%.*]] = icmp ult <2 x i64> [[STEP_ADD]], <i64 495616, i64 495616>
233-
; CHECK-NEXT: [[TMP7:%.*]] = icmp ult <2 x i64> [[VEC_IND]], <i64 991232, i64 991232>
234-
; CHECK-NEXT: [[TMP8:%.*]] = icmp ult <2 x i64> [[STEP_ADD]], <i64 991232, i64 991232>
235-
; CHECK-NEXT: [[TMP9:%.*]] = xor <2 x i1> [[TMP5]], <i1 true, i1 true>
236-
; CHECK-NEXT: [[TMP10:%.*]] = xor <2 x i1> [[TMP6]], <i1 true, i1 true>
237-
; CHECK-NEXT: [[PREDPHI:%.*]] = select <2 x i1> [[TMP5]], <2 x float> <float 2.300000e+01, float 2.300000e+01>, <2 x float> <float 4.200000e+01, float 4.200000e+01>
238-
; CHECK-NEXT: [[PREDPHI2:%.*]] = select <2 x i1> [[TMP6]], <2 x float> <float 2.300000e+01, float 2.300000e+01>, <2 x float> <float 4.200000e+01, float 4.200000e+01>
239-
; CHECK-NEXT: [[TMP11:%.*]] = getelementptr inbounds float, float* [[A:%.*]], i64 [[TMP1]]
240-
; CHECK-NEXT: [[TMP12:%.*]] = getelementptr inbounds float, float* [[A]], i64 [[TMP3]]
241-
; CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds float, float* [[TMP11]], i32 0
242-
; CHECK-NEXT: [[TMP14:%.*]] = bitcast float* [[TMP13]] to <2 x float>*
243-
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <2 x float>, <2 x float>* [[TMP14]], align 4
244-
; CHECK-NEXT: [[TMP15:%.*]] = getelementptr inbounds float, float* [[TMP11]], i32 2
245-
; CHECK-NEXT: [[TMP16:%.*]] = bitcast float* [[TMP15]] to <2 x float>*
246-
; CHECK-NEXT: [[WIDE_LOAD3:%.*]] = load <2 x float>, <2 x float>* [[TMP16]], align 4
247-
; CHECK-NEXT: [[TMP17:%.*]] = fmul <2 x float> [[PREDPHI]], [[WIDE_LOAD]]
248-
; CHECK-NEXT: [[TMP18:%.*]] = fmul <2 x float> [[PREDPHI2]], [[WIDE_LOAD3]]
249-
; CHECK-NEXT: [[TMP19:%.*]] = getelementptr inbounds float, float* [[B:%.*]], i64 [[TMP1]]
250-
; CHECK-NEXT: [[TMP20:%.*]] = getelementptr inbounds float, float* [[B]], i64 [[TMP3]]
251-
; CHECK-NEXT: [[TMP21:%.*]] = getelementptr inbounds float, float* [[TMP19]], i32 0
252-
; CHECK-NEXT: [[TMP22:%.*]] = bitcast float* [[TMP21]] to <2 x float>*
253-
; CHECK-NEXT: store <2 x float> [[TMP17]], <2 x float>* [[TMP22]], align 4
254-
; CHECK-NEXT: [[TMP23:%.*]] = getelementptr inbounds float, float* [[TMP19]], i32 2
255-
; CHECK-NEXT: [[TMP24:%.*]] = bitcast float* [[TMP23]] to <2 x float>*
256-
; CHECK-NEXT: store <2 x float> [[TMP18]], <2 x float>* [[TMP24]], align 4
257-
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
258-
; CHECK-NEXT: [[VEC_IND_NEXT]] = add <2 x i64> [[STEP_ADD]], <i64 2, i64 2>
259-
; CHECK-NEXT: [[TMP25:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]
260-
; CHECK-NEXT: br i1 [[TMP25]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP11:![0-9]+]]
261-
; CHECK: middle.block:
262-
; CHECK-NEXT: [[CMP_N:%.*]] = icmp eq i64 [[TMP0]], [[N_VEC]]
263-
; CHECK-NEXT: br i1 [[CMP_N]], label [[FOR_COND_CLEANUP_LOOPEXIT:%.*]], label [[SCALAR_PH]]
264-
; CHECK: scalar.ph:
265-
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[MIDDLE_BLOCK]] ], [ 0, [[FOR_BODY_PREHEADER]] ]
266-
; CHECK-NEXT: br label [[FOR_BODY:%.*]]
267-
; CHECK: for.cond.cleanup.loopexit:
268-
; CHECK-NEXT: br label [[FOR_COND_CLEANUP]]
269-
; CHECK: for.cond.cleanup:
270-
; CHECK-NEXT: ret void
97+
; CHECK-NOT: llvm.assume
27198
; CHECK: for.body:
272-
; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[BC_RESUME_VAL]], [[SCALAR_PH]] ], [ [[INDVARS_IV_NEXT:%.*]], [[IF_END5:%.*]] ]
273-
; CHECK-NEXT: [[CMP1:%.*]] = icmp ult i64 [[INDVARS_IV]], 495616
274-
; CHECK-NEXT: br i1 [[CMP1]], label [[IF_END5]], label [[IF_ELSE:%.*]]
275-
; CHECK: if.else:
276-
; CHECK-NEXT: [[CMP2:%.*]] = icmp ult i64 [[INDVARS_IV]], 991232
277-
; CHECK-NEXT: tail call void @llvm.assume(i1 [[CMP2]])
278-
; CHECK-NEXT: br label [[IF_END5]]
279-
; CHECK: if.end5:
280-
; CHECK-NEXT: [[X_0:%.*]] = phi float [ 4.200000e+01, [[IF_ELSE]] ], [ 2.300000e+01, [[FOR_BODY]] ]
281-
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, float* [[A]], i64 [[INDVARS_IV]]
282-
; CHECK-NEXT: [[TMP26:%.*]] = load float, float* [[ARRAYIDX]], align 4
283-
; CHECK-NEXT: [[MUL:%.*]] = fmul float [[X_0]], [[TMP26]]
284-
; CHECK-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds float, float* [[B]], i64 [[INDVARS_IV]]
285-
; CHECK-NEXT: store float [[MUL]], float* [[ARRAYIDX7]], align 4
286-
; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
287-
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT]], [[TMP0]]
288-
; CHECK-NEXT: br i1 [[CMP]], label [[FOR_COND_CLEANUP_LOOPEXIT]], label [[FOR_BODY]], !llvm.loop [[LOOP12:![0-9]+]]
289-
;
29099
entry:
291100
%cmp15 = icmp eq i32 %n, 0
292101
br i1 %cmp15, label %for.cond.cleanup, label %for.body.preheader

0 commit comments

Comments
 (0)