[llvm-commits] [llvm] r41740 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2007-09-05-EqualGEP.ll

Chris Lattner clattner at apple.com
Thu Sep 6 00:20:30 PDT 2007

On Sep 5, 2007, at 7:40 PM, Nick Lewycky wrote:

> Chris Lattner wrote:
>> On Sep 5, 2007, at 6:10 PM, Nick Lewycky wrote:
>>> Author: nicholas
>>> Date: Wed Sep  5 20:10:22 2007
>>> New Revision: 41740
>>> URL: http://llvm.org/viewvc/llvm-project?rev=41740&view=rev
>>> Log:
>>> When the two operands of an icmp are equal, there are five possible
>>> predicates
>>> that would make the icmp true. Fixes PR1637.
>> Thanks for fixing this Nicholas!  Instead of enumerating the ICMP
>> opcodes, please use the isTrueWhenEqual function in InstCombine.cpp
> Done. I had to break it up so that it would take a Predicate  
> instead of
> a whole ICmpInst.

Sounds good, thanks!

> Is there a place in common code that this could be moved to? I've had
> need of this function before.

Moving it to be a method on ICmpInst would make sense to me!


More information about the llvm-commits mailing list