summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2019-01-11 18:46:02 +0000
committerPirama Arumuga Nainar <pirama@google.com>2019-01-11 18:46:02 +0000
commitcc07dabdaa634d59466b1a80e4d1d4a742147254 (patch)
tree82db7e8486cb600dae1425abe3727cdfa7535708 /llvm/lib
parentce386e306dfe1786ca880894eaea420fe4cfd7c3 (diff)
downloadbcm5719-llvm-cc07dabdaa634d59466b1a80e4d1d4a742147254.tar.gz
bcm5719-llvm-cc07dabdaa634d59466b1a80e4d1d4a742147254.zip
[Legalizer] Use correct ValueType of SELECT_CC node during Float promotion
Summary: When legalizing the result of a SELECT_CC node by promoting the floating-point type, use the promoted-to type rather than the original type. Fix PR40273. Reviewers: efriedma, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56566 llvm-svn: 350951
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 866744c397b..4644e9588e7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -2143,9 +2143,9 @@ SDValue DAGTypeLegalizer::PromoteFloatRes_SELECT_CC(SDNode *N) {
SDValue TrueVal = GetPromotedFloat(N->getOperand(2));
SDValue FalseVal = GetPromotedFloat(N->getOperand(3));
- return DAG.getNode(ISD::SELECT_CC, SDLoc(N), N->getValueType(0),
- N->getOperand(0), N->getOperand(1), TrueVal, FalseVal,
- N->getOperand(4));
+ return DAG.getNode(ISD::SELECT_CC, SDLoc(N),
+ TrueVal.getNode()->getValueType(0), N->getOperand(0),
+ N->getOperand(1), TrueVal, FalseVal, N->getOperand(4));
}
// Construct a SDNode that transforms the SINT or UINT operand to the promoted
OpenPOWER on IntegriCloud