xref: /llvm-project/llvm/test/CodeGen/DirectX/Metadata/shaderModel-cs.ll (revision 8aa8c0590c09a52737787ed7c35befa3fbede231)
1*8107810cSJustin Bogner; RUN: opt -S -dxil-translate-metadata %s | FileCheck %s
25e9dd882SXiang Li; RUN: opt -S -dxil-prepare  %s | FileCheck %s  --check-prefix=REMOVE_EXTRA_ATTRIBUTE
35e9dd882SXiang Li
4c0a76c2cSChris Bienemantarget triple = "dxil-pc-shadermodel6.6-compute"
5c0a76c2cSChris Bieneman
6c0a76c2cSChris Bieneman; CHECK: !dx.shaderModel = !{![[SM:[0-9]+]]}
7c0a76c2cSChris Bieneman; CHECK: ![[SM]] = !{!"cs", i32 6, i32 6}
8b8615079SXiang Li
9b8615079SXiang Lidefine void @entry() #0 {
10b8615079SXiang Lientry:
11b8615079SXiang Li  ret void
12b8615079SXiang Li}
13b8615079SXiang Li
145e9dd882SXiang Li; Make sure extra attribute like hlsl.numthreads are removed.
155e9dd882SXiang Li; And experimental attribute is removed when validator version is not 0.0.
165e9dd882SXiang Li; REMOVE_EXTRA_ATTRIBUTE:attributes #0 = { noinline nounwind }
175e9dd882SXiang Liattributes #0 = { noinline nounwind "exp-shader"="cs" "hlsl.numthreads"="1,2,1" "hlsl.shader"="compute" }
18