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

Chris Lattner clattner at apple.com
Wed Dec 19 17:15:00 PST 2007


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.

-Chris



More information about the llvm-commits mailing list