[llvm] [SPIRV] Restrict OpName generation to major values (PR #171886)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 15 08:58:06 PST 2025


================
@@ -139,101 +93,115 @@ declare dso_local spir_func noundef nofpclass(nan inf) <2 x float> @_Z23__spirv_
 define weak_odr dso_local spir_kernel void @foo(float %1, float %2) {
 entry:
   %addRes = fadd float %1,  %2
-  store float %addRes, float* @G_addRes
+  store volatile float %addRes, float* @G_addRes
----------------
s-perron wrote:

They are volatile so that the stores are not removed. since we sometimes write to the same location multiple times, I don't want it removed as a redundant store. We could avoid the volatile if we had a different variable for each store, but I felt that cluttered the test.

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


More information about the llvm-commits mailing list