Skip to content

Commit 330a8f9

Browse files
authored
[LV][NFC] Remove use of -print-after=... to verify IR output (llvm#194882)
In the case of LoopVectorize/loop-scalars.ll this means we can now remove "REQUIRES: asserts" as well.
1 parent b8551d9 commit 330a8f9

3 files changed

Lines changed: 21 additions & 20 deletions

File tree

llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-uniforms.ll

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --filter-out-after "scalar.ph\:" --version 5
22
; REQUIRES: asserts
3-
; RUN: opt < %s -aa-pipeline=basic-aa -passes=loop-vectorize,instcombine -S -debug-only=loop-vectorize -disable-output -print-after=instcombine 2>&1 | FileCheck %s
3+
; RUN: opt < %s -aa-pipeline=basic-aa -passes=loop-vectorize,instcombine -S -debug-only=loop-vectorize 2>%t -S | FileCheck %s
4+
; RUN: cat %t | FileCheck %s --check-prefix=DEBUG
45
; RUN: opt < %s -passes=loop-vectorize -force-vector-width=2 -S | FileCheck %s -check-prefix=FORCE
56

67
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
78
target triple = "x86_64-unknown-linux-gnu"
89

9-
; CHECK-LABEL: PR31671
10+
; DEBUG-LABEL: PR31671
1011
;
1112
; Check a pointer in which one of its uses is consecutive-like and another of
1213
; its uses is non-consecutive-like. In the test case below, %tmp3 is the
@@ -15,10 +16,10 @@ target triple = "x86_64-unknown-linux-gnu"
1516
; scatter operation. %tmp3 (and the induction variable) should not be marked
1617
; uniform-after-vectorization.
1718
;
18-
; CHECK: LV: Found uniform instruction: %tmp0 = getelementptr inbounds %data, ptr %d, i64 0, i32 3, i64 %i
19-
; CHECK-NOT: LV: Found uniform instruction: %tmp3 = getelementptr inbounds %data, ptr %d, i64 0, i32 0, i64 %i
20-
; CHECK-NOT: LV: Found uniform instruction: %i = phi i64 [ %i.next, %for.body ], [ 0, %entry ]
21-
; CHECK-NOT: LV: Found uniform instruction: %i.next = add nuw nsw i64 %i, 5
19+
; DEBUG: LV: Found uniform instruction: %tmp0 = getelementptr inbounds %data, ptr %d, i64 0, i32 3, i64 %i
20+
; DEBUG-NOT: LV: Found uniform instruction: %tmp3 = getelementptr inbounds %data, ptr %d, i64 0, i32 0, i64 %i
21+
; DEBUG-NOT: LV: Found uniform instruction: %i = phi i64 [ %i.next, %for.body ], [ 0, %entry ]
22+
; DEBUG-NOT: LV: Found uniform instruction: %i.next = add nuw nsw i64 %i, 5
2223

2324

2425
%data = type { [32000 x float], [3 x i32], [4 x i8], [32000 x float] }
@@ -154,17 +155,17 @@ for.end:
154155

155156
attributes #0 = { "target-cpu"="knl" }
156157

157-
; CHECK-LABEL: PR40816
158+
; DEBUG-LABEL: PR40816
158159
;
159160
; Check that scalar with predication instructions are not considered uniform
160161
; after vectorization, because that results in replicating a region instead of
161162
; having a single instance (out of VF). The predication stems from a tiny count
162163
; of 3 leading to folding the tail by masking using icmp ule <i, i+1> <= <2, 2>.
163164
;
164-
; CHECK: LV: Found trip count: 3
165-
; CHECK: LV: Found uniform instruction: {{%.*}} = icmp eq i32 {{%.*}}, 0
166-
; CHECK-NOT: LV: Found uniform instruction: {{%.*}} = load i32, ptr {{%.*}}, align 1
167-
; CHECK: LV: Found not uniform due to requiring predication: {{%.*}} = load i32, ptr {{%.*}}, align 1
165+
; DEBUG: LV: Found trip count: 3
166+
; DEBUG: LV: Found uniform instruction: {{%.*}} = icmp eq i32 {{%.*}}, 0
167+
; DEBUG-NOT: LV: Found uniform instruction: {{%.*}} = load i32, ptr {{%.*}}, align 1
168+
; DEBUG: LV: Found not uniform due to requiring predication: {{%.*}} = load i32, ptr {{%.*}}, align 1
168169
;
169170
;
170171
@a = internal constant [3 x i32] [i32 7, i32 7, i32 0], align 1

llvm/test/Transforms/LoopVectorize/loop-scalars.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; REQUIRES: asserts
3-
; RUN: opt < %s -aa-pipeline=basic-aa -passes=loop-vectorize,instcombine -force-vector-width=2 -force-vector-interleave=1 -debug-only=loop-vectorize -disable-output -print-after=instcombine 2>&1 | FileCheck %s
2+
; RUN: opt < %s -aa-pipeline=basic-aa -passes=loop-vectorize,instcombine -force-vector-width=2 -force-vector-interleave=1 -S | FileCheck %s
43

54
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
65

llvm/test/Transforms/LoopVectorize/phi-cost.ll

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
22
; REQUIRES: asserts
3-
; RUN: opt < %s -passes='function(loop-vectorize,instcombine)' -force-vector-width=2 -force-vector-interleave=1 -debug-only=loop-vectorize -disable-output -print-after=instcombine 2>&1 | FileCheck %s
3+
; RUN: opt < %s -passes='function(loop-vectorize,instcombine)' -force-vector-width=2 -force-vector-interleave=1 -debug-only=loop-vectorize 2>%t -S | FileCheck %s
4+
; RUN: cat %s | FileCheck %s --check-prefix=DEBUG
45

56
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
67

7-
; CHECK-LABEL: phi_two_incoming_values
8-
; CHECK: Cost of 1 for VF 2: induction instruction %i = phi i64 [ %i.next, %if.end ], [ 0, %entry ]
9-
; CHECK: Cost of 1 for VF 2: BLEND ir<%tmp5> = ir<%tmp1> ir<%tmp4>/ir<%tmp3>
8+
; DEBUG-LABEL: phi_two_incoming_values
9+
; DEBUG: Cost of 1 for VF 2: induction instruction %i = phi i64 [ %i.next, %if.end ], [ 0, %entry ]
10+
; DEBUG: Cost of 1 for VF 2: BLEND ir<%tmp5> = ir<%tmp1> ir<%tmp4>/ir<%tmp3>
1011
;
1112
define void @phi_two_incoming_values(ptr noalias %a, ptr noalias %b, i64 %n) {
1213
; CHECK-LABEL: define void @phi_two_incoming_values(
@@ -81,9 +82,9 @@ for.end:
8182
ret void
8283
}
8384

84-
; CHECK-LABEL: phi_three_incoming_values
85-
; CHECK: Cost of 1 for VF 2: induction instruction %i = phi i64 [ %i.next, %if.end ], [ 0, %entry ]
86-
; CHECK: Cost of 2 for VF 2: BLEND ir<%tmp8> = ir<%tmp7> ir<3>/vp<{{.*}}> ir<9>/vp<{{.*}}>
85+
; DEBUG-LABEL: phi_three_incoming_values
86+
; DEBUG: Cost of 1 for VF 2: induction instruction %i = phi i64 [ %i.next, %if.end ], [ 0, %entry ]
87+
; DEBUG: Cost of 2 for VF 2: BLEND ir<%tmp8> = ir<%tmp7> ir<3>/vp<{{.*}}> ir<9>/vp<{{.*}}>
8788
;
8889
define void @phi_three_incoming_values(ptr noalias %a, ptr noalias %b, i64 %n) {
8990
; CHECK-LABEL: define void @phi_three_incoming_values(

0 commit comments

Comments
 (0)