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

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 10:16:22 PDT 2016


majnemer 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);
----------------
Can we just make this `Op1->getType()->isVectorTy()` ?


http://reviews.llvm.org/D20289





More information about the llvm-commits mailing list