llvm-project/polly/test/ScopInfo/NonAffine
Philip Reames 2ca8a3f213 [SCEV] Stop blindly propagating flags from inbound geps to SCEV nodes
This fixes a violation of the wrap flag rules introduced in c4048d8f. This was also noted in the (very old) PR23527.

The issue being fixed is that we assume the inbound flag on any GEP assumes that all users of *any* gep (or add) which happens to map to that SCEV would also be UB if the (other) gep overflowed. That's simply not true.

In terms of the test diffs, I don't see anything seriously problematic. The lost flags are expected (given the semantic restriction on when its legal to tag the SCEV), and there are several cases where the previously inferred flags are unsound per the new semantics.

The only common trend I noticed when looking at the deltas is that by not considering branch on poison as immediate UB in ValueTracking, we do miss a few cases we could reclaim. We may be able to claw some of these back with the follow ideas mentioned in PR51817.

It's worth noting that most of the changes are analysis result only changes. The two transform changes are pretty minimal. In one case, we miss the opportunity to infer a nuw (correctly). In the other, we fail to fold an exit and produce a loop invariant form instead. This one is probably over-reduced as the program appears to be undefined in practice, and neither before or after exploits that.

Differential Revision: https://reviews.llvm.org/D109789
2021-10-01 16:30:44 -07:00
..
div_backedge.ll
div_domain.ll
invariant_loads_dependent_in_non_affine_region.ll
modulo_backedge.ll
modulo_domain.ll
non-affine-loop-condition-dependent-access_1.ll
non-affine-loop-condition-dependent-access_2.ll [SCEV] Stop blindly propagating flags from inbound geps to SCEV nodes 2021-10-01 16:30:44 -07:00
non-affine-loop-condition-dependent-access_3.ll
non_affine_access_with_range_2.ll
non_affine_but_sdiv.ll
non_affine_but_srem.ll
non_affine_conditional_nested.ll
non_affine_conditional_surrounding_affine_loop.ll
non_affine_conditional_surrounding_non_affine_loop.ll
non_affine_float_compare.ll
non_affine_loop_condition.ll
non_affine_loop_used_later.ll
non_affine_parametric_loop.ll
non_affine_region_guaranteed_non-entry.ll
whole-scop-non-affine-subregion-in-loop.ll