[llvm] af84127 - [SPIR-V] Remove dead typed pointer check in getArgSPIRVType (#209515)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 00:58:35 PDT 2026


Author: Arseniy Obolenskiy
Date: 2026-07-15T09:58:30+02:00
New Revision: af84127cbfc571f86cf7c9ac344223e190bb9970

URL: https://github.com/llvm/llvm-project/commit/af84127cbfc571f86cf7c9ac344223e190bb9970
DIFF: https://github.com/llvm/llvm-project/commit/af84127cbfc571f86cf7c9ac344223e190bb9970.diff

LOG: [SPIR-V] Remove dead typed pointer check in getArgSPIRVType (#209515)

Arg->getType() can never be a TypedPointerType since opaque pointers are
now the only pointer representation in LLVM IR

Added: 
    

Modified: 
    llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
index 22cbf7cc5e75e..01f5873b20e42 100644
--- a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
@@ -170,11 +170,6 @@ static SPIRVTypeInst getArgSPIRVType(const Function &F, unsigned ArgIdx,
                                     true);
 
   Type *ArgType = Arg->getType();
-  if (isTypedPointerTy(ArgType)) {
-    return GR->getOrCreateSPIRVPointerType(
-        cast<TypedPointerType>(ArgType)->getElementType(), MIRBuilder,
-        addressSpaceToStorageClass(getPointerAddressSpace(ArgType), ST));
-  }
 
   // In case OriginalArgType is of untyped pointer type, there are three
   // possibilities:


        


More information about the llvm-commits mailing list