[llvm-commits] [llvm] r75531 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/zext-bool-add-sub.ll

Nick Lewycky nicholas at mxc.ca
Mon Jul 13 22:44:58 PDT 2009


Chris Lattner wrote:
> On Jul 13, 2009, at 4:19 PM, Eli Friedman wrote:
> 
>> On Mon, Jul 13, 2009 at 4:03 PM, Chris Lattner<clattner at apple.com>  
>> wrote:
>>> That probably dates back to when 'sext from bool' was new.  Pre-2.0  
>>> we
>>> had no such operation, and there were bugs immediately after the
>>> conversion.
>> No; see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20081027/069081.html
>> .
> 
> Heh, ok, listen to that guy :)

The rationale was that any arbitrary sequence of operations on a boolean 
can be folded into a select on that boolean. Then it's just up to the 
backend to do the most efficient lowering of that select.

I don't think anyone has tackled this seriously to make sure the 
backends currently do a more efficient lowering than the other obvious 
sequences.

Nick




More information about the llvm-commits mailing list