llvm-6502/test
Andrew Trick c846d65f99 Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things.
getSCEV for an ashr instruction creates an intermediate zext
expression when it truncates its operand.

The operand is initially inside the loop, so the narrow zext
expression has a non-loop-invariant loop disposition.

LoopSimplify then runs on an outer loop, hoists the ashr operand, and
properly invalidate the SCEVs that are mapped to value.

The SCEV expression for the ashr is now an AddRec with the hoisted
value as the now loop-invariant start value.

The LoopDisposition of this wide value was properly invalidated during
LoopSimplify.

However, if we later get the ashr SCEV again, we again try to create
the intermediate zext expression. We get the same SCEV that we did
earlier, and it is still cached because it was never mapped to a
Value. When we try to create a new AddRec we abort because we're using
the old non-loop-invariant LoopDisposition.

I don't have a solution for this other than to clear LoopDisposition
when LoopSimplify hoists things.

I think the long-term strategy should be to perform LoopSimplify on
all loops before computing SCEV and before running any loop opts on
individual loops. It's possible we may want to rerun LoopSimplify on
individual loops, but it should rarely do anything, so rarely require
invalidating SCEV.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198478 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-04 05:52:49 +00:00
..
Analysis BasicAA: Use reachabilty instead of dominance for checking value equality in phi 2014-01-03 05:47:03 +00:00
Assembler Allow addrspacecast in global aliases 2014-01-02 20:55:01 +00:00
Bindings Update the ML test to expect the new string format of getStringRepresentation. 2013-12-19 23:38:09 +00:00
Bitcode Fold vector selects with undef elements in the condition. Fixes PR18319. 2013-12-31 19:30:47 +00:00
BugPoint
CodeGen [RegAlloc] Make tryInstructionSplit less aggressive. 2014-01-02 22:47:22 +00:00
DebugInfo Revert "Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names."" 2014-01-03 18:59:42 +00:00
ExecutionEngine
Feature
FileCheck
Instrumentation [ASan] Fix the tests broken by r198018 to check for private linkage of ASan-generated globals. 2013-12-25 17:06:04 +00:00
Integer
JitListener
Linker
LTO
MC [AArch64][NEON] Added SXTL and SXTL2 instruction aliases 2014-01-03 19:20:31 +00:00
Object
Other
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
tools Teach the llvm-readobj COFF dumper to dump debug line tables from object files 2013-12-19 11:37:14 +00:00
Transforms Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things. 2014-01-04 05:52:49 +00:00
Unit
Verifier Fix all the verifier tests I added for address spaces. 2014-01-02 21:09:05 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in [CMake] Add missing set_output_directory after Takumi's change in r198205. 2014-01-02 19:47:45 +00:00
Makefile
Makefile.tests
TestRunner.sh