[Bug 14664] InstCombine missing canonicalization of sub-and into a select.

Nadav Rotem nrotem at apple.com
Tue Jan 29 22:36:55 PST 2013


Committed in r173901. 

Thanks!

On Jan 29, 2013, at 1:25 PM, Muhammad Tauqir Ahmad <muhammad.t.ahmad at intel.com> wrote:

> Comments in-line.
> 
> Thanks.
> - Muhammad Tauqir
> 
> 
> On Tue, Jan 29, 2013 at 2:56 PM, Nadav Rotem <nrotem at apple.com> wrote:
>> 
>> On Jan 29, 2013, at 11:48 AM, Muhammad Tauqir Ahmad <muhammad.t.ahmad at intel.com> wrote:
>> 
>>> <0002-instcombine-missing-canonicalization-of-sext-and-to-select.patch>
>> 
>> +      if (X->getType()->isIntegerTy(1) ||
>> +          (X->getType()->isVectorTy() &&
>> +           X->getType()->getVectorElementType()->isIntegerTy(1))) {
>> 
>> 
>> You can use "X->getScalarType()->isIntegerTy(1)".
> 
> Thanks! That makes the code much cleaner although I think we still
> need X-getType()->getScalarType()->isIntegerTy(1). Fixed.
> 
>> 
>> +        Value *zero = Constant::getNullValue(Op1->getType());
>> 
>> zero -> Zero.
> 
> Didn't notice you were asking me to change zero -> Zero. I was using
> zero because other parts of the code were using zero. Fixed.
> 
>> 
>> Did you run any tests on this commit ?  Its a good idea to run the test-suite locally before committing just to make sure that we don't break anything.
> 
> Yes I did. I ran the check-all tests and the test-suite.
> 
>> 
>> Thanks,
>> Nadav
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> <0003-instcombine-missing-canonicalization-of-sext-and-to-select.patch>




More information about the llvm-commits mailing list