[llvm] [LAA] Clean up APInt-overflow related code (NFC) (PR #140048)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 29 03:34:12 PDT 2025


================
@@ -842,19 +842,12 @@ getStrideFromAddRec(const SCEVAddRecExpr *AR, const Loop *Lp, Type *AccessTy,
   TypeSize AllocSize = DL.getTypeAllocSize(AccessTy);
   int64_t Size = AllocSize.getFixedValue();
 
-  // Huge step value - give up.
-  if (APStepVal->getBitWidth() > 64)
----------------
fhahn wrote:

Is it possible that this is due to the index size by default is just 64 bit, so they will be truncated?

It should be possible to test with 128 bit pointers and index size. Added some tests that should hopefully show the functional change in c5a49fb62d4196bf26f1a4e2340accd4f242de5d

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


More information about the llvm-commits mailing list