[llvm] [DXIL] Add support for root signature flag element in DXContainer (PR #123147)

Damyan Pepper via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 18:13:42 PST 2025


================
@@ -0,0 +1,18 @@
+; RUN: not llc %s --filetype=obj -o - 2>&1 | FileCheck %s
+
+target triple = "dxil-unknown-shadermodel6.0-compute"
+
+; CHECK: error: Missing Root Element Metadata Node.
+
+
+define void @main() #0 {
+entry:
+  ret void
+}
+
+attributes #0 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }
+
----------------
damyanp wrote:

If I add:

```llvmir
define void @anotherMain() #1 {
entry:
  ret void
}
attributes #1 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }
```

To this file then the assert I mentioned previously will fire. 

https://github.com/llvm/llvm-project/pull/123147


More information about the llvm-commits mailing list