diff options
| author | Craig Topper <craig.topper@gmail.com> | 2020-01-11 17:27:55 -0800 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2020-01-11 17:50:20 -0800 |
| commit | ed679804d5e34dcb1046c5087acaf5d1dbb9b582 (patch) | |
| tree | a944cbb13b053054f21959ea9e0a77a573544ce2 /llvm/lib/CodeGen/SelectionDAG | |
| parent | ddfcd82bdc219dd2dc04d6826c417cea3da65d12 (diff) | |
| download | bcm5719-llvm-ed679804d5e34dcb1046c5087acaf5d1dbb9b582.tar.gz bcm5719-llvm-ed679804d5e34dcb1046c5087acaf5d1dbb9b582.zip | |
[TargetLowering][X86] Connect the chain from STRICT_FSETCC in TargetLowering::expandFP_TO_UINT and X86TargetLowering::FP_TO_INTHelper.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index d37a733d242..24ab65171a1 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -6134,11 +6134,13 @@ bool TargetLowering::expandFP_TO_UINT(SDNode *Node, SDValue &Result, SDValue Cst = DAG.getConstantFP(APF, dl, SrcVT); SDValue Sel; - if (Node->isStrictFPOpcode()) + if (Node->isStrictFPOpcode()) { Sel = DAG.getSetCC(dl, SetCCVT, Src, Cst, ISD::SETLT, Node->getOperand(0), /*IsSignaling*/ true); - else + Chain = Sel.getValue(1); + } else { Sel = DAG.getSetCC(dl, SetCCVT, Src, Cst, ISD::SETLT); + } bool Strict = Node->isStrictFPOpcode() || shouldUseStrictFP_TO_INT(SrcVT, DstVT, /*IsSigned*/ false); @@ -6161,7 +6163,7 @@ bool TargetLowering::expandFP_TO_UINT(SDNode *Node, SDValue &Result, SDValue SInt; if (Node->isStrictFPOpcode()) { SDValue Val = DAG.getNode(ISD::STRICT_FSUB, dl, { SrcVT, MVT::Other }, - { Node->getOperand(0), Src, FltOfs }); + { Chain, Src, FltOfs }); SInt = DAG.getNode(ISD::STRICT_FP_TO_SINT, dl, { DstVT, MVT::Other }, { Val.getValue(1), Val }); Chain = SInt.getValue(1); |

