[clang] [llvm] [DirectX] emmit `dx.precise` metadata when using `-Gis` flag (PR #192526)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 17 17:03:07 PDT 2026


================
@@ -5,13 +5,76 @@
 
 target triple = "dxil-pc-shadermodel6.6-compute"
 
-; ENABLED: call float @dx.op.unary.f32(i32 12, float %conv)
+; ENABLED: call float @dx.op.unary.f32(i32 7,
 ; ENABLED-SAME: !dx.precise ![[SM:[0-9]+]]
+; ENABLED-COUNT-26: !dx.precise ![[SM]]
+; ENABLED-NOT: !dx.precise ![[SM]]
 ; ENABLED: ![[SM]] = !{i32 1}
 
 ; DISABLED-NOT: !dx.precise ![[SM:[0-9]+]]
-define void @main(float %conv) {
+define void @unary(float %p) {
----------------
joaosaffran wrote:

I've refactored the test to make it easier to review. All checks are now per function. I've made the `@wave_rla_i32` check explicit, so it is clearly checking for the absense of dx.precise. This was the only operations that had an i32 overload for me to test it. All the others only allow float types.

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


More information about the cfe-commits mailing list