llvm-6502/lib
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
..
Analysis Use static and anonymous namespaces consistently with other passes. 2008-05-15 19:43:55 +00:00
Archive Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
AsmParser IR support for extractvalue and insertvalue instructions. Also, begin 2008-05-15 19:50:34 +00:00
Bitcode Allow an extra bit for CommonLinkage. 2008-05-15 20:49:28 +00:00
CodeGen Actually scalarize the operand to BIT_CONVERT instead of asking someone to do 2008-05-15 20:40:58 +00:00
Debugger Make these variables static. 2008-04-23 23:15:23 +00:00
ExecutionEngine Disable JIT symbol table for now. 2008-05-15 17:31:35 +00:00
Linker Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better. 2008-05-15 10:04:30 +00:00
Support Don't assume underlying APInt type is limited 2008-05-14 22:53:25 +00:00
System Make PreVerifyID, IntSigsEnd, and KillSigsEnd const. 2008-05-14 00:42:30 +00:00
Target Fix typos and comments. 2008-05-15 22:13:02 +00:00
Transforms Fix a bug in LoopStrengthReduce that caused it to emit IR with 2008-05-15 23:26:57 +00:00
VMCore IR support for extractvalue and insertvalue instructions. Also, begin 2008-05-15 19:50:34 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00