[PATCH] D43375: [SCEV] Prove predicates in loops via monotonicity
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 23:41:35 PST 2018
sanjoy added inline comments.
Comment at: test/Transforms/IndVarSimplify/prove_via_monotonicity.ll:19
+ %len.minus.1 = add nsw i32 %len, -1
+ %zero_check = icmp eq i32 %len, 0
+ br i1 %zero_check, label %loopexit, label %preheader
I think we can optimize these cases without thinking about monotonicity -- in both `@test_01` and `@test_02` to widen the IV you need to prove that *if* the backedge is taken *then* `%iv` is not `0`; and SCEV should be able to prove that easily from the BE condition.
More information about the llvm-commits