[llvm-commits] [llvm] r123060 - in /llvm/trunk: lib/Transforms/Scalar/LoopRotation.cpp test/Transforms/LoopRotate/phi-duplicate.ll

Chris Lattner clattner at apple.com
Sat Jan 8 09:41:54 PST 2011


On Jan 8, 2011, at 5:36 AM, Duncan Sands wrote:

>>       delete C;
>> +      ValueMap[Inst] = V;
>> +    } else {
> 
> since instsimplify can look through phi nodes, it doesn't automatically preserve
> LCSSA form.  Passes like loop-rotate that need to preserve LCSSA form should do
> something like this:
> 
>   if (Value *V = SimplifyInstruction(C))
>     if (LI->replacementPreservesLCSSAForm(C, V)) {
>       .. use the simplification ...
>     }

Great catch, fixed in r123066, thanks!

-Chris



More information about the llvm-commits mailing list