diff options
author | Yingchi Long <i@lyc.dev> | 2024-07-24 14:50:07 +0800 |
---|---|---|
committer | Yingchi Long <i@lyc.dev> | 2024-07-24 14:50:07 +0800 |
commit | b07dae6beee934dc6a0080c5e28cb48db5a7e7a5 (patch) | |
tree | c7f61a5cd5fab6d051fd2612268108ff76c01014 | |
parent | 20bb06845ae011e77236295c63ca61eb504a5ec3 (diff) | |
download | llvm-users/inclyc/legalize-op-correctness.zip llvm-users/inclyc/legalize-op-correctness.tar.gz llvm-users/inclyc/legalize-op-correctness.tar.bz2 |
address comments from @RKSimonusers/inclyc/legalize-op-correctness
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 9 |
1 files 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); } |