[PATCH] D117203: [Attributor] Remove notional overindexing check

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 09:57:58 PST 2022


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

LG, see comment



================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:1185
           return true;
-        if (!CE->isGEPWithNoNotionalOverIndexing()) {
+        auto *GEP = cast<GEPOperator>(CE);
+        if (!GEP || !GEP->hasAllConstantIndices()) {
----------------
dyn_cast? I agree we can drop the indices check. We need to verify it's a GEP though, at least given the code as it is.


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

https://reviews.llvm.org/D117203



More information about the llvm-commits mailing list