31 lines · plain
1; RUN: not opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s2 3target triple = "dxilv1.3-pc-shadermodel6.3-library"4 5; All entry functions of a library shader need to either have optnone6; or not have the attribute7; CHECK: error:8; CHECK-SAME: in function entry_two9; CHECK-SAME: Inconsistent optnone attribute10; Function Attrs: convergent noinline norecurse optnone11define void @entry_one() #0 {12entry:13 ret void14}15 16; Function Attrs: convergent noinline norecurse17define void @entry_two() #1 {18entry:19 ret void20}21 22attributes #0 = { 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" }23attributes #1 = { convergent noinline norecurse "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" }24 25!llvm.module.flags = !{!0, !1}26!dx.valver = !{!2}27 28!0 = !{i32 1, !"wchar_size", i32 4}29!1 = !{i32 4, !"dx.disable_optimizations", i32 1}30!2 = !{i32 1, i32 8}31