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
32
43target triple = "dxil-pc-shadermodel6.7-library"
54
@@ -14,32 +13,25 @@ target triple = "dxil-pc-shadermodel6.7-library"
1413;CHECK-NEXT: ; Shader Flags for Module Functions
1514
1615;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 ) {
1817 %sum = add i16 %a , %b
1918 ret i16 %sum
2019}
2120
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
2524;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 ) {
2726 %sum = add i32 %a , %b
2827 ret i32 %sum
2928}
3029
3130;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 ) {
3332 %sum = fadd half %a , %b
3433 ret half %sum
3534}
3635
37- attributes #0 = { convergent norecurse nounwind "hlsl.export" }
38-
3936!llvm.module.flags = !{!0 }
4037!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