[llvm] [DirectX] Infrastructure to collect shader flags for each function (PR #112967)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 13:35:07 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
----------------
bharadwajy 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
> ```

Changes made to limited checking to the two flags.

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


More information about the llvm-commits mailing list