45 lines · plain
1; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s2 3 4; CHECK: ; Combined Shader Flags for Module5; CHECK-NEXT: ; Shader Flags Value: 0x000000016 7; CHECK: ; Note: extra DXIL module flags:8; CHECK-NEXT: ; Disable shader optimizations9 10; CHECK: ; Shader Flags for Module Functions11; CHECK: ; Function main : 0x0000000112; The test source in this file generated from the following command:13; clang -cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -O0 -o - <<EOF14 15; [numthreads(1,1,1)]16; [shader("compute")]17; void main() {}18 19; int foo() {return 0;}20; EOF21 22target triple = "dxilv1.3-pc-shadermodel6.3-library"23 24; Function Attrs: convergent mustprogress noinline norecurse nounwind optnone25define internal void @_Z4mainv() #0 {26entry:27 ret void28}29 30; Function Attrs: convergent noinline norecurse optnone31define void @main() #1 {32entry:33 call void @_Z4mainv()34 ret void35}36 37; Function Attrs: convergent mustprogress noinline norecurse nounwind optnone38define noundef i32 @_Z3foov() #0 {39entry:40 ret i32 041}42 43attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }44attributes #1 = { convergent noinline norecurse optnone "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }45