Skip to content

Commit a9d6a6a

Browse files
committed
Set dx.resmayalias module flag to only test Typed UAV Load Additional Formats
1 parent 5c14432 commit a9d6a6a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

llvm/test/CodeGen/DirectX/ShaderFlags/typed-uav-load-additional-formats.ll

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ target triple = "dxil-pc-shadermodel6.7-library"
88
; CHECK-OBJ: TypedUAVLoadAdditionalFormats: true
99

1010
; CHECK: Combined Shader Flags for Module
11-
; CHECK-NEXT: Shader Flags Value: 0x200002000
11+
; CHECK-NEXT: Shader Flags Value: 0x00002000
1212

1313
; CHECK: Note: shader requires additional functionality:
1414
; CHECK: Typed UAV Load Additional Formats
15-
; CHECK: Any UAV may not alias any other UAV
1615

17-
; CHECK: Function multicomponent : 0x200002000
16+
; CHECK: Function multicomponent : 0x00002000
1817
define <4 x float> @multicomponent() #0 {
1918
%res = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)
2019
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, i1 false)
@@ -24,7 +23,7 @@ define <4 x float> @multicomponent() #0 {
2423
ret <4 x float> %val
2524
}
2625

27-
; CHECK: Function onecomponent : 0x200000000
26+
; CHECK: Function onecomponent : 0x00000000
2827
define float @onecomponent() #0 {
2928
%res = call target("dx.TypedBuffer", float, 1, 0, 0)
3029
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, i1 false)
@@ -34,7 +33,7 @@ define float @onecomponent() #0 {
3433
ret float %val
3534
}
3635

37-
; CHECK: Function noload : 0x200000000
36+
; CHECK: Function noload : 0x00000000
3837
define void @noload(<4 x float> %val) #0 {
3938
%res = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)
4039
@llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, i1 false)
@@ -44,4 +43,8 @@ define void @noload(<4 x float> %val) #0 {
4443
ret void
4544
}
4645

46+
!llvm.module.flags = !{!0}
47+
!0 = !{i32 1, !"dx.resmayalias", i32 1}
48+
4749
attributes #0 = { convergent norecurse nounwind "hlsl.export"}
50+

0 commit comments

Comments
 (0)