llvm-6502/test/CodeGen
Dan Gohman f20d70d57e Fix a bug in LoopStrengthReduce that caused it to emit IR with
use-before-def. The problem comes up in code with multiple PHIs where
one PHI is being rewritten in terms of the other, but the other needs
to be casted first. LLVM rules requre the cast instruction to be
inserted after any PHI instructions, but when instructions were
inserted to replace the second PHI value with a function of the first,
they were ended up going before the cast instruction. Avoid this
problem by remembering the location of the cast instruction, when one
is needed, and inserting the expansion of the new value after it.

This fixes a bug that surfaced in 255.vortex on x86-64 when
instcombine was removed from the middle of the loop optimization
passes. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 23:26:57 +00:00
..
Alpha Fix RUN line. 2008-03-09 19:55:22 +00:00
ARM If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy. 2008-04-11 17:54:45 +00:00
CBackend rename *.llx -> *.ll 2008-04-19 22:29:10 +00:00
CellSPU Update and_ops.ll according to the recent dagcombiner changes. 2008-04-28 23:26:22 +00:00
Generic Remove the code from CodeGenPrepare that moved getresult instructions 2008-04-25 18:27:55 +00:00
IA64 Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
PowerPC Adding testcase. 2008-05-01 18:41:09 +00:00
SPARC Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
X86 Fix a bug in LoopStrengthReduce that caused it to emit IR with 2008-05-15 23:26:57 +00:00