1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Transforms/IRCE
Roman Tereshin 91525f438c Revert "[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs"
This reverts r319889.

Unfortunately, wrapping flags are not a part of SCEV's identity (they
do not participate in computing a hash value or in equality
comparisons) and in fact they could be assigned after the fact w/o
rebuilding a SCEV.

Grep for const_cast's to see quite a few of examples, apparently all
for AddRec's at the moment.

So, if 2 expressions get built in 2 slightly different ways: one with
flags set in the beginning, the other with the flags attached later
on, we may end up with 2 expressions which are exactly the same but
have their operands swapped in one of the commutative N-ary
expressions, and at least one of them will have "sorted by complexity"
invariant broken.

2 identical SCEV's won't compare equal by pointer comparison as they
are supposed to.

A real-world reproducer is added as a regression test: the issue
described causes 2 identical SCEV expressions to have different order
of operands and therefore compare not equal, which in its turn
prevents LoadStoreVectorizer from vectorizing a pair of consecutive
loads.

On a larger example (the source of the test attached, which is a
bugpoint) I have seen even weirder behavior: adding a constant to an
existing SCEV changes the order of the existing terms, for instance,
getAddExpr(1, ((A * B) + (C * D))) returns (1 + (C * D) + (A * B)).

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

llvm-svn: 340777
2018-08-27 21:41:37 +00:00
..
add-metadata-pre-post-loops.ll
bad_expander.ll
bad-loop-structure.ll
bug-loop-varying-upper-limit.ll
bug-mismatched-types.ll
clamp.ll
conjunctive-checks.ll Revert "[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs" 2018-08-27 21:41:37 +00:00
correct-loop-info.ll
decrementing-loop.ll [SCEV] Prove implications for SCEVUnknown Phis 2018-04-04 05:46:47 +00:00
empty_ranges.ll
eq_ne.ll
low-becount.ll
multiple-access-no-preloop.ll
non_known_positive_end.ll [IRCE] Relax restriction on collected range checks 2018-04-09 06:01:22 +00:00
not-likely-taken.ll
only-lower-check.ll
only-upper-check.ll
optimistic_scev.ll
pre_post_loops.ll
range_intersect_miscompile.ll [IRCE] Relax restriction on collected range checks 2018-04-09 06:01:22 +00:00
ranges_of_different_types.ll
rc-negative-bound.ll [IRCE] Fix miscompile with range checks against negative values 2018-05-19 13:06:37 +00:00
single-access-no-preloop.ll Revert "[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs" 2018-08-27 21:41:37 +00:00
single-access-with-preloop.ll
skip-profitability-checks.ll
stride_more_than_1.ll [IRCE] Only check for NSW on equality predicates 2018-04-18 13:50:28 +00:00
unhandled.ll
unsigned_comparisons_ugt.ll
unsigned_comparisons_ult.ll
variable-loop-bounds.ll [IRCE] isKnownNonNegative helper function 2018-04-12 12:49:40 +00:00
with-parent-loops.ll