[llvm] 95ce8f9 - [LegalizeTypes] In PromoteFloatOp_SETCC, don't both querying for transforming the result type.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 14 15:05:40 PST 2019
Author: Craig Topper
Date: 2019-12-14T15:05:32-08:00
New Revision: 95ce8f94986c7d246c381757f6afbc00fe7bdbfb
URL: https://github.com/llvm/llvm-project/commit/95ce8f94986c7d246c381757f6afbc00fe7bdbfb
DIFF: https://github.com/llvm/llvm-project/commit/95ce8f94986c7d246c381757f6afbc00fe7bdbfb.diff
LOG: [LegalizeTypes] In PromoteFloatOp_SETCC, don't both querying for transforming the result type.
The result type is already legal, is doesnt' need to be
transformed.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index a563845b39f5..8c96dcf896c4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -2019,12 +2019,11 @@ SDValue DAGTypeLegalizer::PromoteFloatOp_SELECT_CC(SDNode *N, unsigned OpNo) {
// code.
SDValue DAGTypeLegalizer::PromoteFloatOp_SETCC(SDNode *N, unsigned OpNo) {
EVT VT = N->getValueType(0);
- EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
SDValue Op0 = GetPromotedFloat(N->getOperand(0));
SDValue Op1 = GetPromotedFloat(N->getOperand(1));
ISD::CondCode CCCode = cast<CondCodeSDNode>(N->getOperand(2))->get();
- return DAG.getSetCC(SDLoc(N), NVT, Op0, Op1, CCCode);
+ return DAG.getSetCC(SDLoc(N), VT, Op0, Op1, CCCode);
}
More information about the llvm-commits
mailing list