[PATCH] D112378: [BasicAA] Use ranges for more than one index

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 04:19:27 PDT 2021


courbet accepted this revision.
courbet added a comment.
This revision is now accepted and ready to land.

Nice !



================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1283
+                                                      Index.CxtI))
+          .sextOrTrunc(Range.getBitWidth()).smul_fast(ConstantRange(Scale)));
     }
----------------
this works because `Scale` and `Offset` (and therefore, `Range`) have the same bit width (`MaxPointerSize`). Maybe add an `assert((Range.getBitWidth() ==  Scale.getBitWidth()) && "why this is guaranteed")` ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112378/new/

https://reviews.llvm.org/D112378



More information about the llvm-commits mailing list