[llvm] [StackSafetyAnalysis] Don't call getTruncateOrZeroExtend for pointers of different sizes (PR #79804)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 03:16:52 PST 2024


================
@@ -273,6 +273,17 @@ ConstantRange StackSafetyLocalAnalysis::offsetFrom(Value *Addr, Value *Base) {
     return UnknownRange;
 
   auto *PtrTy = PointerType::getUnqual(SE.getContext());
----------------
Pierre-vh wrote:

I tried it and the pass messes up somewhere else instead. It seems like the pass isn't written with handling address spaces with differently sized pointers at all. It even hardcodes the pointer size for AS 0 and uses it in a bunch of places.

The changes needed to the pass seems to be big, I don't mind looking at it sometime but this is really a blocker so we need a quick bandaid first.

https://github.com/llvm/llvm-project/pull/79804


More information about the llvm-commits mailing list