[llvm] [DirectX] Infrastructure to collect shader flags for each function (PR #112967)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 00:37:35 PST 2024
================
@@ -0,0 +1,19 @@
+; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
+
+target triple = "dxil-pc-shadermodel6.7-library"
+define double @div(double %a, double %b) #0 {
+ %res = fdiv double %a, %b
+ ret double %res
+}
+
+attributes #0 = { convergent norecurse nounwind "hlsl.export"}
+
+; DXC: - Name: SFI0
+; DXC-NEXT: Size: 8
+; DXC-NEXT: Flags:
+; DXC-NEXT: Doubles: true
+; DXC-NOT: {{[A-Za-z]+: +true}}
+; DXC: DX11_1_DoubleExtensions: true
+; DXC-NOT: {{[A-Za-z]+: +true}}
+; DXC: NextUnusedBit: false
----------------
bogner wrote:
This doesn't seem like the place to check that all of the other flags are false. Just doing the two checks should be sufficient:
```
; CHECK: Doubles: true
; CHECK: DX11_1_DoubleExtensions: true
```
https://github.com/llvm/llvm-project/pull/112967
More information about the llvm-commits
mailing list