1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Transforms/LoopDistribute
Florian Hahn 4fd7f95ec0 [SCEVExpander] Avoid re-using existing casts if it means updating users.
Currently the SCEVExpander tries to re-use existing casts, even if they
are not exactly at the insertion point it was asked to create the cast.
To do so in some case, it creates a new cast at the insertion point and
updates all users to use the new cast.

This behavior is problematic, because it changes the IR outside of the
instructions created during the expansion. Therefore we cannot
completely undo all changes made during expansion.

This re-use should be only an extra optimization, so only using the new
cast in the expanded instructions should not be a correctness issue.
There are many cases equivalent instructions are created during
expansion.

This patch also adjusts findInsertPointAfter to skip instructions
inserted during expansion. This enables re-using existing casts without
the renaming any uses, by picking a better insertion point.

Reviewed By: efriedma, lebedev.ri

Differential Revision: https://reviews.llvm.org/D84399
2020-08-09 13:25:17 +01:00
..
basic-with-memchecks.ll
basic.ll
bounds-expansion-bug.ll
convergent-no-cross-partition-checks.ll
crash-in-memcheck-generation.ll
diagnostics-with-hotness.ll
diagnostics.ll
disable_nonforced_enable.ll
disable_nonforced.ll
followup.ll
metadata.ll
no-if-convert.ll
outside-use.ll
pr28443.ll
program-order.ll
scev-inserted-runtime-check.ll
symbolic-stride.ll
unknown-bounds-for-memchecks.ll