diff options
| author | Pirama Arumuga Nainar <pirama@google.com> | 2019-01-11 18:46:02 +0000 |
|---|---|---|
| committer | Pirama Arumuga Nainar <pirama@google.com> | 2019-01-11 18:46:02 +0000 |
| commit | cc07dabdaa634d59466b1a80e4d1d4a742147254 (patch) | |
| tree | 82db7e8486cb600dae1425abe3727cdfa7535708 /llvm/lib | |
| parent | ce386e306dfe1786ca880894eaea420fe4cfd7c3 (diff) | |
| download | bcm5719-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.cpp | 6 |
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 |

