From faa56f7b081816d4e1c87eed4b47f17fe9cbe9f5 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 26 Jan 2018 07:15:17 +0000 Subject: [PATCH] [X86] Remove LowerVSETCC code for handling vXi1 setcc with vXi8/vXi16 input type. NFC These kinds of setccs are promoted by a DAG combine before they ever get to legalization. llvm-svn: 323501 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 9f7cbb78664e..f9c665e08c7e 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -17944,12 +17944,9 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget &Subtarget, if (VT.getVectorElementType() == MVT::i1) { // In AVX-512 architecture setcc returns mask with i1 elements, // But there is no compare instruction for i8 and i16 elements in KNL. - // In this case use SSE compare - if (OpVT.getScalarSizeInBits() >= 32 || Subtarget.hasBWI()) - return LowerIntVSETCC_AVX512(Op, DAG); - - return DAG.getNode(ISD::TRUNCATE, dl, VT, - DAG.getNode(ISD::SETCC, dl, OpVT, Op0, Op1, CC)); + assert((OpVT.getScalarSizeInBits() >= 32 || Subtarget.hasBWI()) && + "Unexpected operand type"); + return LowerIntVSETCC_AVX512(Op, DAG); } // Lower using XOP integer comparisons.