[llvm] [NVPTX] instcombine known pointer AS checks. (PR #112964)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 15:31:07 PDT 2024
================
@@ -6365,6 +6367,34 @@ static Value *simplifyUnaryIntrinsic(Function *F, Value *Op0,
break;
}
+ case Intrinsic::nvvm_isspacep_global:
+ case Intrinsic::nvvm_isspacep_local:
+ case Intrinsic::nvvm_isspacep_shared:
+ case Intrinsic::nvvm_isspacep_const: {
+ auto *Ty = F->getReturnType();
+ unsigned AS = Op0->getType()->getPointerAddressSpace();
+ if (AS == NVPTXAS::ADDRESS_SPACE_GENERIC) {
+ if (auto *ASC = dyn_cast<AddrSpaceCastInst>(Op0))
----------------
AlexMaclean wrote:
Can AddrSpaceCastOperator be used here?
https://github.com/llvm/llvm-project/pull/112964
More information about the llvm-commits
mailing list