Skip to content

Commit b18f093

Browse files
committed
remove nonuniform test, patternmatch vars, simplify test description
1 parent fb2932e commit b18f093

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

llvm/test/CodeGen/DirectX/metadata-stripping.ll

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
; RUN: opt -S --dxil-prepare %s | FileCheck %s
22

3-
; This test tests the whitelist inside of DxilPrepare.cpp.
4-
; It ensures that certain metadata nodes are removed that aren't
5-
; in the whitelist, and that certain nodes may remain that
6-
; are on the whitelist.
3+
; Test that only metadata nodes that are valid in DXIL are allowed through
74

85
target triple = "dxilv1.0-unknown-shadermodel6.0-compute"
96

@@ -12,24 +9,17 @@ define void @main(i32* %ptr) {
129
entry:
1310
; metadata ID changes to 0 once the current !0 and !1 are removed
1411
; since they aren't in the whitelist. range needs a payload.
15-
; CHECK: %val = load i32, ptr %ptr, align 4, !range !0
12+
; CHECK: %val = load i32, ptr %ptr, align 4, !range [[RANGEMD:![0-9]+]]
1613
%val = load i32, ptr %ptr, align 4, !range !2
1714

18-
; dx.nonuniform is a valid metadata node kind on the whitelist,
19-
; so give it a bogus payload and ensure it sticks around
20-
; CHECK-next: %cmp.i1.not = icmp eq i32 1, 0, !dx.nonuniform !0
21-
%cmp.i1.not = icmp eq i32 1, 0, !dx.nonuniform !2
22-
br i1 %cmp.i1.not, label %_Z4mainDv3_j.exit, label %for.body.i
23-
24-
for.body.i: ; preds = %entry
2515
%cmp.i = icmp ult i32 1, 2
26-
br i1 %cmp.i, label %for.body.i, label %_Z4mainDv3_j.exit, !llvm.loop !0
16+
br i1 %cmp.i, label %_Z4mainDv3_j.exit, label %_Z4mainDv3_j.exit, !llvm.loop !0
2717

2818
_Z4mainDv3_j.exit: ; preds = %for.body.i, %entry
2919
ret void
3020
}
3121

32-
; CHECK: !0 = !{i32 1, i32 5}
22+
; CHECK: [[RANGEMD]] = !{i32 1, i32 5}
3323
; this next check line checks that nothing comes after the above check line.
3424
; No more metadata should be necessary, the rest (the current 0 and 1)
3525
; should be removed.

0 commit comments

Comments
 (0)