Skip to content

Commit 303a487

Browse files
committed
swap check conditions when expand ISD::FP_TO_FP16
1 parent ad2ac08 commit 303a487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3853,7 +3853,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
38533853
break;
38543854
case ISD::FP_TO_FP16:
38553855
LLVM_DEBUG(dbgs() << "Legalizing FP_TO_FP16\n");
3856-
if (!TLI.useSoftFloat() && Node->getFlags().hasApproximateFuncs()) {
3856+
if (Node->getFlags().hasApproximateFuncs() && !TLI.useSoftFloat()) {
38573857
SDValue Op = Node->getOperand(0);
38583858
MVT SVT = Op.getSimpleValueType();
38593859
if ((SVT == MVT::f64 || SVT == MVT::f80) &&

0 commit comments

Comments
 (0)