1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Transforms/LoopStrengthReduce/X86
Eli Friedman b83eae9454 Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers.
As part of making ScalarEvolution's handling of pointers consistent, we
want to forbid multiplying a pointer by -1 (or any other value). This
means we can't blindly subtract pointers.

There are a few ways we could deal with this:
1. We could completely forbid subtracting pointers in getMinusSCEV()
2. We could forbid subracting pointers with different pointer bases
(this patch).
3. We could try to ptrtoint pointer operands.

The option in this patch is more friendly to non-integral pointers: code
that works with normal pointers will also work with non-integral
pointers. And it seems like there are very few places that actually
benefit from the third option.

As a minimal patch, the ScalarEvolution implementation of getMinusSCEV
still ends up subtracting pointers if they have the same base.  This
should eliminate the shared pointer base, but eventually we'll need to
rewrite it to avoid negating the pointer base. I plan to do this as a
separate step to allow measuring the compile-time impact.

This doesn't cause obvious functional changes in most cases; the one
case that is significantly affected is ICmpZero handling in LSR (which
is the source of almost all the test changes).  The resulting changes
seem okay to me, but suggestions welcome.  As an alternative, I tried
explicitly ptrtoint'ing the operands, but the result doesn't seem
obviously better.

I deleted the test lsr-undef-in-binop.ll becuase I couldn't figure out
how to repair it to test what it was actually trying to test.

Recommitting with fix to MemoryDepChecker::isDependent.

Differential Revision: https://reviews.llvm.org/D104806
2021-07-06 12:16:05 -07:00
..
2008-08-14-ShadowIV.ll
2009-11-10-LSRCrash.ll
2011-07-20-DoubleIV.ll
2011-11-29-postincphi.ll
2011-12-04-loserreg.ll
2012-01-13-phielim.ll
bin_power.ll
canonical-2.ll
canonical.ll
eh-insertion-point-2.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
eh-insertion-point.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
expander-crashes.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
expander-reused-value-insert-point.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
incorrect-offset-scaling.ll
ivchain-stress-X86.ll
ivchain-X86.ll Recommit [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers. 2021-07-06 12:16:05 -07:00
lit.local.cfg
lsr-cond-dbg.ll [LoopStrengthReduce] Ensure that debug intrinsics do not affect LSR's output 2021-06-02 15:56:23 +01:00
lsr-expand-quadratic.ll
lsr-filtering-scaledreg.ll
lsr-insns-1.ll
lsr-insns-2.ll
lsr-overflow.ll
macro-fuse-cmp.ll
nested-loop.ll [llvm] Update tests that got missed in adee485adf84ae8a. 2021-06-23 10:29:58 +01:00
no_superflous_induction_vars.ll
pr17473.ll
pr28719.ll
pr40514.ll
pr46943.ll [test] Properly match parameter/argument ABI attributes 2021-05-31 09:12:18 -07:00
pr47776-do-not-apply-info-from-guards-to-addrecs.ll
sibling-loops.ll