[llvm] [SPIR-V] Add lowering of ptrtoaddr (PR #184577)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 07:27:40 PST 2026


================
@@ -1725,6 +1727,57 @@ Instruction *SPIRVEmitIntrinsics::visitBitCastInst(BitCastInst &I) {
   return NewI;
 }
 
+Instruction *SPIRVEmitIntrinsics::visitPtrToAddrInst(PtrToAddrInst &I) {
----------------
Keenuts wrote:

Yes, this should be gated against physical storage buffer for shaders. But I'm not sure if there is a valid case where this instruction should show up outside of this context. So maybe this should be an assert?

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


More information about the llvm-commits mailing list