llvm-project/llvm/test/Transforms/IRCE
Max Kazantsev 0a9c1ef2eb [IRCE] Identify loops with latch comparison against current IV value
Current implementation of parseLoopStructure interprets the latch comparison as a
comarison against `iv.next`. If the actual comparison is made against the `iv` current value
then the loop may be rejected, because this misinterpretation leads to incorrect evaluation
of the latch start value.

This patch teaches the IRCE to distinguish this kind of loops and perform the optimization
for them. Now we use `IndVarBase` variable which can be either next or current value of the
induction variable (previously we used `IndVarNext` which was always the value on next iteration).

Differential Revision: https://reviews.llvm.org/D36215

llvm-svn: 312221
2017-08-31 07:04:20 +00:00
..
add-metadata-pre-post-loops.ll [IRCE] Avoid loop optimizations on pre and post loops 2016-12-13 21:05:21 +00:00
bad-loop-structure.ll [IRCE] Add a missing invariant check 2017-02-07 23:59:07 +00:00
bug-loop-varying-upper-limit.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
bug-mismatched-types.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
clamp.ll [IRCE] Fix buggy behavior in Clamp 2017-08-18 22:50:29 +00:00
conjunctive-checks.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
correct-loop-info.ll [IRCE] Canonicalize pre/post loops after the blocks are added into parent loop 2017-06-06 14:54:01 +00:00
decrementing-loop.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
eq_ne.ll [IRCE] Recognize loops with unsigned latch conditions 2017-08-04 05:40:20 +00:00
latch-comparison-against-current-value.ll [IRCE] Identify loops with latch comparison against current IV value 2017-08-31 07:04:20 +00:00
low-becount.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
multiple-access-no-preloop.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
not-likely-taken.ll
only-lower-check.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
only-upper-check.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
pre_post_loops.ll [IRCE] Fix corner case with Start = INT_MAX 2017-07-14 06:35:03 +00:00
single-access-no-preloop.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
single-access-with-preloop.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
skip-profitability-checks.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
stride_more_than_1.ll [IRCE] Handle loops with step different from 1/-1 2017-08-04 07:01:04 +00:00
unhandled.ll [IRCE] Create llvm::Loop instances for cloned out loops 2016-08-14 01:04:46 +00:00
unsigned_comparisons_ugt.ll [IRCE] Recognize loops with unsigned latch conditions 2017-08-04 05:40:20 +00:00
unsigned_comparisons_ult.ll [IRCE] Recognize loops with unsigned latch conditions 2017-08-04 05:40:20 +00:00
with-parent-loops.ll