[llvm] [SPIR-V] Implement SPV_KHR_untyped_pointers extension (PR #201233)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 08:19:29 PDT 2026
================
@@ -728,16 +731,19 @@ static bool buildAtomicCompareExchangeInst(
SPIRVTypeInst SpvDesiredTy = GR->getSPIRVTypeForVReg(Desired);
LLT DesiredLLT = MRI->getType(Desired);
- assert(GR->getSPIRVTypeForVReg(ObjectPtr)->getOpcode() ==
- SPIRV::OpTypePointer);
+ [[maybe_unused]] auto IsPtrTy = [](unsigned Op) {
+ return Op == SPIRV::OpTypePointer || Op == SPIRV::OpTypeUntypedPointerKHR;
+ };
----------------
jmmartinez wrote:
Maybe we can move this as a helper in `SPIRVTypeInst.h`. The same check also appears in other assertions.
https://github.com/llvm/llvm-project/pull/201233
More information about the llvm-commits
mailing list