[llvm] [SPIRV] Expand RWBuffer load and store from HLSL (PR #122355)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 01:47:26 PST 2025


================
@@ -725,6 +732,14 @@ Type *SPIRVEmitIntrinsics::deduceElementTypeHelper(
       if (Ty)
         break;
     }
+  } else if (auto *II = dyn_cast<IntrinsicInst>(I)) {
----------------
VyacheslavLevytskyy wrote:

Yes, thank you, that's it. The only thing is that you don't need the new record `{"llvm.spv.resource.getpointer", 0}` in `ResTypeByArg`. This map contains cases when argument and result types are the same, and in your case it's not true, because argument is Image but result is, for example, i32, if I understood the logic correctly. So without the new record `{"llvm.spv.resource.getpointer", 0}` in `ResTypeByArg` it will be exactly what I had in mind.

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


More information about the llvm-commits mailing list