llvm-6502/lib/Transforms
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
..
Hello Clean up the use of static and anonymous namespaces. This turned up 2008-05-13 00:00:25 +00:00
Instrumentation 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
IPO 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
Scalar Fix a bug in LoopStrengthReduce that caused it to emit IR with 2008-05-15 23:26:57 +00:00
Utils 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
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00