1
1
; 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
3
2
4
3
target triple = "dxil-pc-shadermodel6.7-library"
5
4
@@ -14,32 +13,25 @@ target triple = "dxil-pc-shadermodel6.7-library"
14
13
;CHECK-NEXT: ; Shader Flags for Module Functions
15
14
16
15
;CHECK-LABEL: ; Function add_i16 : 0x00800020
17
- define i16 @add_i16 (i16 %a , i16 %b ) # 0 {
16
+ define i16 @add_i16 (i16 %a , i16 %b ) {
18
17
%sum = add i16 %a , %b
19
18
ret i16 %sum
20
19
}
21
20
22
- ; NOTE: The flag for native low precision is set for every function in the
23
- ; module regardless of whether or not the function uses low precision data
24
- ; types. This matches the behavior in DXC
21
+ ; NOTE: The flag for native low precision (0x80000) is set for every function
22
+ ; in the module regardless of whether or not the function uses low precision
23
+ ; data types (flag 0x20) . This matches the behavior in DXC
25
24
;CHECK-LABEL: ; Function add_i32 : 0x00800000
26
- define i32 @add_i32 (i32 %a , i32 %b ) # 0 {
25
+ define i32 @add_i32 (i32 %a , i32 %b ) {
27
26
%sum = add i32 %a , %b
28
27
ret i32 %sum
29
28
}
30
29
31
30
;CHECK-LABEL: ; Function add_half : 0x00800020
32
- define half @add_half (half %a , half %b ) # 0 {
31
+ define half @add_half (half %a , half %b ) {
33
32
%sum = fadd half %a , %b
34
33
ret half %sum
35
34
}
36
35
37
- attributes #0 = { convergent norecurse nounwind "hlsl.export" }
38
-
39
36
!llvm.module.flags = !{!0 }
40
37
!0 = !{i32 1 , !"dx.nativelowprec" , i32 1 }
41
-
42
- ; DXC: - Name: SFI0
43
- ; DXC-NEXT: Size: 8
44
- ; DXC-NOT: Flags:
45
- ; DXC: ...
0 commit comments