Skip to content

Commit 75887db

Browse files
committed
Add obj2yaml tests for Max64UAVs
1 parent 220f62d commit 75887db

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-valver1.5.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
; number of UAVs for setting the shader flag '64 UAV slots' when the validator
55
; version is < 1.6
66

7-
; Note: there is no feature flag here (only a module flag), so we don't have an
8-
; object test.
9-
107
target triple = "dxil-pc-shadermodel6.7-library"
118

129
; CHECK: Combined Shader Flags for Module

llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-valver1.6.ll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
2+
; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
23

34
; This test makes sure that resource arrays sizes are accounted for when
45
; counting the number of UAVs for setting the shader flag '64 UAV slots' when
56
; the validator version is >= 1.6
67

7-
; Note: there is no feature flag here (only a module flag), so we don't have an
8-
; object test.
9-
108
target triple = "dxil-pc-shadermodel6.7-library"
119

1210
; CHECK: Combined Shader Flags for Module
@@ -36,3 +34,12 @@ define void @test() "hlsl.export" {
3634
; Set this flag to 1 to prevent the ResMayNotAlias flag from being set
3735
!llvm.module.flags = !{!0}
3836
!0 = !{i32 1, !"dx.resmayalias", i32 1}
37+
38+
; DXC: - Name: SFI0
39+
; DXC-NEXT: Size: 8
40+
; DXC-NEXT: Flags:
41+
; DXC-NOT: {{[A-Za-z]+: +true}}
42+
; DXC: Max64UAVs: true
43+
; DXC-NOT: {{[A-Za-z]+: +true}}
44+
; DXC: NextUnusedBit: false
45+
; DXC: ...

llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs.ll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
2+
; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
23

34
; This test makes sure that the shader flag '64 UAV slots' is set when there are
45
; more than 8 UAVs in the module.
56

6-
; Note: there is no feature flag here (only a module flag), so we don't have an
7-
; object test.
8-
97
target triple = "dxil-pc-shadermodel6.7-library"
108

119
; CHECK: Combined Shader Flags for Module
@@ -58,3 +56,12 @@ define void @test() "hlsl.export" {
5856

5957
!llvm.module.flags = !{!0}
6058
!0 = !{i32 1, !"dx.resmayalias", i32 1}
59+
60+
; DXC: - Name: SFI0
61+
; DXC-NEXT: Size: 8
62+
; DXC-NEXT: Flags:
63+
; DXC-NOT: {{[A-Za-z]+: +true}}
64+
; DXC: Max64UAVs: true
65+
; DXC-NOT: {{[A-Za-z]+: +true}}
66+
; DXC: NextUnusedBit: false
67+
; DXC: ...

0 commit comments

Comments
 (0)