[llvm] [StackSafetyAnalysis] Don't call getTruncateOrZeroExtend for pointers of different sizes (PR #79804)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 13:01:45 PST 2024
================
@@ -273,6 +273,14 @@ ConstantRange StackSafetyLocalAnalysis::offsetFrom(Value *Addr, Value *Base) {
return UnknownRange;
auto *PtrTy = PointerType::getUnqual(SE.getContext());
+
+ // FIXME: Pass does not deal with pointers from different address spaces that
+ // don't have the same size.
+ if (DL.getTypeSizeInBits(Addr->getType()) != PointerSize ||
----------------
vitalybuka wrote:
> I guess the easiest thing then is to just reject any AS != 0 explicitly
Yes. This pass is just and optimization.
https://github.com/llvm/llvm-project/pull/79804
More information about the llvm-commits
mailing list