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

Nick Lewycky nicholas at mxc.ca
Wed Sep 5 19:40:41 PDT 2007

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.

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


More information about the llvm-commits mailing list