forked from OSchip/llvm-project
![]() 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 |
||
---|---|---|
.. | ||
already-vectorized.ll | ||
assume.ll | ||
avx1.ll | ||
avx512.ll | ||
consecutive-ptr-cg-bug.ll | ||
consecutive-ptr-uniforms.ll | ||
constant-fold.ll | ||
constant-vector-operand.ll | ||
conversion-cost.ll | ||
cost-model.ll | ||
float-induction-x86.ll | ||
force-ifcvt.ll | ||
fp32_to_uint32-cost-model.ll | ||
fp64_to_uint32-cost-model.ll | ||
fp_to_sint8-cost-model.ll | ||
funclet.ll | ||
gather-cost.ll | ||
gather-vs-interleave.ll | ||
gather_scatter.ll | ||
gcc-examples.ll | ||
illegal-parallel-loop-uniform-write.ll | ||
imprecise-through-phis.ll | ||
int128_no_gather.ll | ||
interleaving.ll | ||
lit.local.cfg | ||
masked_load_store.ll | ||
max-mstore.ll | ||
metadata-enable.ll | ||
min-trip-count-switch.ll | ||
mul_slm_16bit.ll | ||
no-vector.ll | ||
no_fpmath.ll | ||
no_fpmath_with_hotness.ll | ||
parallel-loops-after-reg2mem.ll | ||
parallel-loops.ll | ||
powof2div.ll | ||
pr23997.ll | ||
pr34438.ll | ||
pr35432.ll | ||
pr36524.ll | ||
propagate-metadata.ll | ||
ptr-indvar-crash.ll | ||
rauw-bug.ll | ||
reduction-crash.ll | ||
reduction-small-size.ll | ||
redundant-vf2-cost.ll | ||
reg-usage-debug.ll | ||
reg-usage.ll | ||
register-assumption.ll | ||
scatter_crash.ll | ||
slm-no-vectorize.ll | ||
small-size.ll | ||
strided_load_cost.ll | ||
struct-store.ll | ||
svml-calls-finite.ll | ||
svml-calls.ll | ||
tripcount.ll | ||
uint64_to_fp64-cost-model.ll | ||
uniform-phi.ll | ||
uniform_load.ll | ||
uniformshift.ll | ||
unroll-pm.ll | ||
unroll-small-loops.ll | ||
unroll_selection.ll | ||
veclib-calls.ll | ||
vect.omp.force.ll | ||
vect.omp.force.small-tc.ll | ||
vector-scalar-select-cost.ll | ||
vector_max_bandwidth.ll | ||
vector_ptr_load_store.ll | ||
vectorization-remarks-loopid-dbg.ll | ||
vectorization-remarks-missed.ll | ||
vectorization-remarks-profitable.ll | ||
vectorization-remarks.ll | ||
vectorize-only-for-real.ll | ||
x86-predication.ll | ||
x86_fp80-vector-store.ll |