[Bug 14664] InstCombine missing canonicalization of sub-and into a select.
Muhammad Tauqir Ahmad
muhammad.t.ahmad at intel.com
Tue Jan 29 13:25:40 PST 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-instcombine-missing-canonicalization-of-sext-and-to-select.patch
Type: application/octet-stream
Size: 4574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/6badae25/attachment.obj>
More information about the llvm-commits
mailing list