[PATCH] D38272: [SimplifyIndVar] Constant fold IV users
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:30:49 PDT 2017
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
Nice!
================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:547
+
+ const Loop *ParentLoop = LI->getLoopFor(I->getParent());
+ S = SE->getSCEVAtScope(S, ParentLoop);
----------------
s/ParentLoop/L
ParentLoop would can be confused with the parent loop of the loop containing I
================
Comment at: test/Transforms/IndVarSimplify/replace-srem-by-urem.ll:74
%mul = mul nsw i32 %i.01, 64
- %rem = srem i32 %mul, 8
+ %rem = srem i32 %mul, 7
; CHECK: urem
----------------
Did you change this to prevent constant folding? If so, please mention that in the commit message.
Repository:
rL LLVM
https://reviews.llvm.org/D38272
More information about the llvm-commits
mailing list