From b07dae6beee934dc6a0080c5e28cb48db5a7e7a5 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Wed, 24 Jul 2024 14:50:07 +0800 Subject: address comments from @RKSimon --- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index 8b6fad6..3bf42e3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -2012,13 +2012,8 @@ SDValue VectorLegalizer::UnrollVSETCC(SDNode *Node) { DAG.getVectorIdxConstant(i, dl)); SDValue RHSElem = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, TmpEltVT, RHS, DAG.getVectorIdxConstant(i, dl)); - Ops[i] = DAG.getNode(ISD::SETCC, dl, - TLI.getSetCCResultType(DAG.getDataLayout(), - *DAG.getContext(), TmpEltVT), - LHSElem, RHSElem, CC); - Ops[i] = DAG.getSelect(dl, EltVT, Ops[i], - DAG.getBoolConstant(true, dl, EltVT, VT), - DAG.getConstant(0, dl, EltVT)); + Ops[i] = DAG.getNode(ISD::SETCC, dl, MVT::i1, LHSElem, RHSElem, CC); + Ops[i] = DAG.getBoolExtOrTrunc(Ops[i], dl, EltVT, VT); } return DAG.getBuildVector(VT, dl, Ops); } -- cgit v1.1