[PATCH] D20289: [InstCombine] check vector elements before trying to transform LE/GE vector icmp (PR27756)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 10:24:30 PDT 2016


spatel added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:3134-3135
@@ -3133,4 +3133,4 @@
   // ConstantVector. Zeros are special. They all derive from Constant.
   if (isa<ConstantDataVector>(Op1) || isa<ConstantVector>(Op1) ||
       isa<ConstantAggregateZero>(Op1)) {
     Constant *Op1C = cast<Constant>(Op1);
----------------
majnemer wrote:
> Can we just make this `Op1->getType()->isVectorTy()` ?
We still need to make sure Op1 is a Constant, but yes, I think that will be cleaner.


http://reviews.llvm.org/D20289





More information about the llvm-commits mailing list