45 lines · plain
1; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s2; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC3 4; Check that when the dx.nativelowprec module flag is not specified, the5; module-level shader flag UseNativeLowPrecision is not set, and the6; MinimumPrecision feature flag is set due to the presence of half and i167; without native low precision.8 9target triple = "dxil-pc-shadermodel6.7-library"10 11;CHECK: ; Combined Shader Flags for Module12;CHECK-NEXT: ; Shader Flags Value: 0x0000002013;CHECK-NEXT: ;14;CHECK-NEXT: ; Note: shader requires additional functionality:15;CHECK-NEXT: ; Minimum-precision data types16;CHECK-NEXT: ; Note: extra DXIL module flags:17;CHECK-NEXT: ; Low-precision data types present18;CHECK-NEXT: ;19;CHECK-NEXT: ; Shader Flags for Module Functions20 21;CHECK-LABEL: ; Function add_i16 : 0x0000002022define i16 @add_i16(i16 %a, i16 %b) "hlsl.export" {23 %sum = add i16 %a, %b24 ret i16 %sum25}26 27;CHECK-LABEL: ; Function add_i32 : 0x0000000028define i32 @add_i32(i32 %a, i32 %b) "hlsl.export" {29 %sum = add i32 %a, %b30 ret i32 %sum31}32 33;CHECK-LABEL: ; Function add_half : 0x0000002034define half @add_half(half %a, half %b) "hlsl.export" {35 %sum = fadd half %a, %b36 ret half %sum37}38 39; DXC: - Name: SFI040; DXC-NEXT: Size: 841; DXC-NEXT: Flags:42; DXC: MinimumPrecision: true43; DXC: NativeLowPrecision: false44; DXC: ...45