[PATCH] D44001: [SCEV] Prove implications for SCEVUnknown Phis

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 00:37:55 PDT 2018


mkazantsev added inline comments.


================
Comment at: llvm/trunk/lib/Analysis/ScalarEvolution.cpp:9604
+    auto *Preheader = RLoop->getLoopPreheader();
+    assert(Preheader && "Loop with AddRec with no preheader?");
+    const SCEV *L1 = getSCEV(LPhi->getIncomingValueForBlock(Preheader));
----------------
efriedma wrote:
> This assertion is triggering on the polly-AOSP buildbot: http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable/builds/477 .
> 
> I can try to reduce a testcase if you need it, but the assertion is pretty obviously just wrong: in general, SCEV doesn't care care whether a loop has a preheader.
Thanks Eli, you're right, we don't actually need preheader here. I think this one should fix that: https://reviews.llvm.org/rL329379


Repository:
  rL LLVM

https://reviews.llvm.org/D44001





More information about the llvm-commits mailing list