[PATCH] D53061: [IndVars] Drop "exact" flag from lshr and udiv when substituting their args
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 10 11:24:29 PDT 2018
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/Transforms/Utils/SimplifyIndVar.cpp:147
+ if (SE->getSCEV(IVSrc) != SE->getMulExpr(FoldedExpr, SE->getSCEV(D)))
+ MustDropPoisonFlags = true;
}
----------------
I'd give this a less generic name, like `IsTransformedUDivExact` or something like that.
================
Comment at: test/Transforms/IndVarSimplify/drop-exact.ll:8
+; we drop "exact" flag on lshr as we do it.
+define void @test(i32* %p, i64* %p1) {
+; CHECK-LABEL: @test(
----------------
Are there existing tests demonstrating that we do keep `exact` when legal? If not, would be nice to add one.
https://reviews.llvm.org/D53061
More information about the llvm-commits
mailing list