[llvm-commits] [llvm] r92408 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/or.ll

Chris Lattner sabre at nondot.org
Fri Jan 1 22:42:36 PST 2010

On Jan 1, 2010, at 6:56 PM, Nick Lewycky wrote:

> Chris Lattner wrote:
>> Author: lattner
>> Date: Fri Jan  1 18:31:05 2010
>> New Revision: 92408
>> URL: http://llvm.org/viewvc/llvm-project?rev=92408&view=rev
>> Log:
>> remove the instcombine transformations that are inserting nasty
>> pointer to int casts that confuse later optimizations.  See PR3351
>> for details.
>> This improves but doesn't complete fix 483.xalancbmk because llvm-gcc
>> does this xform in GCC's "fold" routine as well.  Clang++ will do
>> better I guess.
> So do we want instcombine to turn '((ptrtoint P) or (ptrtoint Q)) == null' into '(P == null) and (Q == null)'?

Sure, can't hurt.

> Operating under the assumption that we do, I've prepared a patch, attached.

Please use match() to simplify the matching logic.


More information about the llvm-commits mailing list