[llvm-commits] [llvm] r123565 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Sun Jan 16 09:45:57 PST 2011


On Jan 16, 2011, at 1:14 AM, Frits van Bommel wrote:

>> +      else
>> +        InV = Builder->CreateSelect(PN->getIncomingValue(i),
>> +                                    TrueVInPred, FalseVInPred, "phitmp");
> 
> This "manual constant folding" is no longer necessary, the IRBuilder
> should handle it. Occurs all over this revision.

Yeah, I thought about that.  The issue is that the constant *must* be folded otherwise the instruction will be inserted in a position that breaks dominance.  Keeping the constant folding explicit seemed the best way to communicate this.

-Chris



More information about the llvm-commits mailing list