[PATCH] D34598: ScalarEvolution: Add URem support

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 05:22:53 PDT 2017


mkazantsev added inline comments.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:5421
       return getUDivExpr(getSCEV(BO->LHS), getSCEV(BO->RHS));
+    case Instruction::URem: {
+      const SCEV *LSCEV = getSCEV(BO->LHS);
----------------
Can we handle RHS = 1 separately and return constant 0 in this case?


https://reviews.llvm.org/D34598





More information about the llvm-commits mailing list