[llvm] r365456 - [SelectionDAG] Simplify some calls to getSetCCResultType. NFC
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 03:27:51 PDT 2019
Author: bjope
Date: Tue Jul 9 03:27:51 2019
New Revision: 365456
URL: http://llvm.org/viewvc/llvm-project?rev=365456&view=rev
Log:
[SelectionDAG] Simplify some calls to getSetCCResultType. NFC
DAGTypeLegalizer and SelectionDAGLegalize has helper
functions wrapping the call to TLI.getSetCCResultType(...).
Use those helpers in more places.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=365456&r1=365455&r2=365456&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jul 9 03:27:51 2019
@@ -3573,8 +3573,7 @@ bool SelectionDAGLegalize::ExpandNode(SD
assert(!TLI.isOperationExpand(ISD::SELECT, VT) &&
"Cannot expand ISD::SELECT_CC when ISD::SELECT also needs to be "
"expanded.");
- EVT CCVT =
- TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), CmpVT);
+ EVT CCVT = getSetCCResultType(CmpVT);
SDValue Cond = DAG.getNode(ISD::SETCC, dl, CCVT, Tmp1, Tmp2, CC, Node->getFlags());
Results.push_back(DAG.getSelect(dl, VT, Cond, Tmp3, Tmp4));
break;
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp?rev=365456&r1=365455&r2=365456&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Tue Jul 9 03:27:51 2019
@@ -2778,8 +2778,7 @@ void DAGTypeLegalizer::ExpandIntRes_MULF
SDValue RHS = N->getOperand(1);
uint64_t Scale = N->getConstantOperandVal(2);
bool Saturating = N->getOpcode() == ISD::SMULFIXSAT;
- EVT BoolVT =
- TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT);
+ EVT BoolVT = getSetCCResultType(VT);
SDValue Zero = DAG.getConstant(0, dl, VT);
if (!Scale) {
SDValue Result;
@@ -2832,8 +2831,7 @@ void DAGTypeLegalizer::ExpandIntRes_MULF
SDValue SatMax, SatMin;
SDValue NVTZero = DAG.getConstant(0, dl, NVT);
SDValue NVTNeg1 = DAG.getConstant(-1, dl, NVT);
- EVT BoolNVT =
- TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), NVT);
+ EVT BoolNVT = getSetCCResultType(NVT);
// After getting the multplication result in 4 parts, we need to perform a
// shift right by the amount of the scale to get the result in that scale.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=365456&r1=365455&r2=365456&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jul 9 03:27:51 2019
@@ -4487,8 +4487,7 @@ SDValue DAGTypeLegalizer::WidenVecOp_SET
// Get a new SETCC node to compare the newly widened operands.
// Only some of the compared elements are legal.
- EVT SVT = TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(),
- InOp0.getValueType());
+ EVT SVT = getSetCCResultType(InOp0.getValueType());
// The result type is legal, if its vXi1, keep vXi1 for the new SETCC.
if (VT.getScalarType() == MVT::i1)
SVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
More information about the llvm-commits
mailing list