[llvm-commits] [llvm] r45173 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Christopher Lamb christopher.lamb at gmail.com
Wed Dec 19 21:48:39 PST 2007


On Dec 19, 2007, at 5:15 PM, Chris Lattner wrote:

> On Dec 19, 2007, at 5:10 PM, Chris Lattner wrote:
>> Finally, is "m" really required to be a constant?  This xform seems
>> valid for any "m" and "A", and more general is good.
>
> Incidentally, in the spirit of generalizing this, it seems like these
> are also valid forms of the same thing:
>
> (icmp lt (sub a, b), 1)
> (icmp sgt (sub a, b), -1)
>
> Instcombine will canonicalize (sle x, 0) -> (slt x, 1)  and (sge x,
> 0) -> (sgt x, -1), so these extra cases are worth handling.

I just noticed that the CFE is fond of producing these. I agree  
they're worth having.

--
Christopher Lamb



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20071219/f15a9f0c/attachment.html>


More information about the llvm-commits mailing list