diff options
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index acc03e722f0..e06ec3945e3 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -3130,8 +3130,9 @@ static ICmpInst *canonicalizeCmpWithConstant(ICmpInst &I,    }    // The usual vector types are ConstantDataVector. Exotic vector types are -  // ConstantVector. They both derive from Constant. -  if (isa<ConstantDataVector>(Op1) || isa<ConstantVector>(Op1)) { +  // ConstantVector. Zeros are special. They all derive from Constant. +  if (isa<ConstantDataVector>(Op1) || isa<ConstantVector>(Op1) || +      isa<ConstantAggregateZero>(Op1)) {      Constant *Op1C = cast<Constant>(Op1);      Type *Op1Type = Op1->getType();      unsigned NumElts = Op1Type->getVectorNumElements();  | 

