From 54fff5c91a8c4dcd9599c9d6cfb9b6fae589ade6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 25 Nov 2017 07:20:23 +0000 Subject: [PATCH] [X86] Qualify some vector specific code with VT.isVector(). NFCI Other checks inside require a build_vector, but we this lets us stop earlier and makes the code more clear. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 4db9fe8fa2b..1673ce55fa0 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -35902,11 +35902,11 @@ static SDValue combineSetCC(SDNode *N, SelectionDAG &DAG, return V; } - if (VT.getScalarType() == MVT::i1 && + if (VT.isVector() && VT.getVectorElementType() == MVT::i1 && (CC == ISD::SETNE || CC == ISD::SETEQ || ISD::isSignedIntSetCC(CC))) { bool IsSEXT0 = (LHS.getOpcode() == ISD::SIGN_EXTEND) && - (LHS.getOperand(0).getValueType().getScalarType() == MVT::i1); + (LHS.getOperand(0).getValueType().getVectorElementType() == MVT::i1); bool IsVZero1 = ISD::isBuildVectorAllZeros(RHS.getNode()); if (!IsSEXT0 || !IsVZero1) { -- 2.50.1