xref: /llvm-project/llvm/test/CodeGen/DirectX/Metadata/shaderModel-cs.ll (revision 8aa8c0590c09a52737787ed7c35befa3fbede231)
1; RUN: opt -S -dxil-translate-metadata %s | FileCheck %s
2; RUN: opt -S -dxil-prepare  %s | FileCheck %s  --check-prefix=REMOVE_EXTRA_ATTRIBUTE
3
4target triple = "dxil-pc-shadermodel6.6-compute"
5
6; CHECK: !dx.shaderModel = !{![[SM:[0-9]+]]}
7; CHECK: ![[SM]] = !{!"cs", i32 6, i32 6}
8
9define void @entry() #0 {
10entry:
11  ret void
12}
13
14; Make sure extra attribute like hlsl.numthreads are removed.
15; And experimental attribute is removed when validator version is not 0.0.
16; REMOVE_EXTRA_ATTRIBUTE:attributes #0 = { noinline nounwind }
17attributes #0 = { noinline nounwind "exp-shader"="cs" "hlsl.numthreads"="1,2,1" "hlsl.shader"="compute" }
18