[PATCH] D14175: [SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 07:42:10 PDT 2015


sbaranga added inline comments.

================
Comment at: lib/Analysis/ScalarEvolution.cpp:3818
@@ +3817,3 @@
+      // by one iteration:
+      //   PHI(f(0), f({1,+,1})) --> f({0,+,1})
+      const SCEV *Shifted = SCEVShiftRewriter::rewrite(BEValue, L, *this);
----------------
Thanks, Sanjoy! Yes, we needed Shift anyway.

I've added a slightly modified rule (it should be equivalent to the one you've posted above).


http://reviews.llvm.org/D14175





More information about the llvm-commits mailing list