[PATCH] D108043: [NFCI][IndVars] rewriteLoopExitValues(): nowadays SCEV should not change `GEP` base pointer

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 15 09:06:00 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG35a8bdc77581: [NFCI][IndVars] rewriteLoopExitValues(): nowadays SCEV should not change `GEP`… (authored by lebedev.ri).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108043

Files:
  llvm/lib/Transforms/Utils/LoopUtils.cpp


Index: llvm/lib/Transforms/Utils/LoopUtils.cpp
===================================================================
--- llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -1351,6 +1351,9 @@
 
     // FIXME: isValidRewrite() is a hack. it should be an assert, eventually.
     Phi.ValidRewrite = isValidRewrite(SE, Phi.ExpansionPoint, Phi.Expansion);
+    assert(Phi.ValidRewrite &&
+           "Now that the SCEV is strict wrt pointer/integer types, this "
+           "invariant is expected to be uphold by SCEV itself.");
     if (!Phi.ValidRewrite) {
       DeadInsts.push_back(Phi.Expansion);
       continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108043.366502.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210815/80ff596c/attachment.bin>


More information about the llvm-commits mailing list