[llvm] [SimplifyCFG] Handle vector GEP in `passingValueIsAlwaysUndefined` (PR #142526)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 00:37:09 PDT 2025
================
@@ -8177,6 +8178,10 @@ static bool passingValueIsAlwaysUndefined(Value *V, Instruction *I, bool PtrValu
NullPointerIsDefined(GEP->getFunction(),
GEP->getPointerAddressSpace())))
PtrValueMayBeModified = true;
+ // The type of GEP may differ from the type of base pointer.
+ if (V->getType() != GEP->getType())
+ V = ConstantVector::getSplat(
+ cast<VectorType>(GEP->getType())->getElementCount(), C);
----------------
dtcxzyw wrote:
Do we have a plan to handle masked vector gather/scatter with null pointers?
https://github.com/llvm/llvm-project/pull/142526
More information about the llvm-commits
mailing list