summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2020-01-11 17:43:22 -0800
committerCraig Topper <craig.topper@gmail.com>2020-01-11 17:50:30 -0800
commitefb674ac2f2b0f06adc3f00df3134dadf1c875df (patch)
tree61e725e3e757df7d46c87d424597a806437f52b5
parented679804d5e34dcb1046c5087acaf5d1dbb9b582 (diff)
downloadbcm5719-llvm-efb674ac2f2b0f06adc3f00df3134dadf1c875df.tar.gz
bcm5719-llvm-efb674ac2f2b0f06adc3f00df3134dadf1c875df.zip
[LegalizeVectorOps] Parallelize the lo/hi part of STRICT_UINT_TO_FLOAT legalization.
The lo and hi computation are independent. Give them the same input chain and TokenFactor the results together.
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
index 9316823d20e..7d0b1ee6ae0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
@@ -1375,15 +1375,18 @@ void VectorLegalizer::ExpandUINT_TO_FLOAT(SDNode *Node,
{Node->getValueType(0), MVT::Other},
{Node->getOperand(0), HI});
fHI = DAG.getNode(ISD::STRICT_FMUL, DL, {Node->getValueType(0), MVT::Other},
- {SDValue(fHI.getNode(), 1), fHI, TWOHW});
+ {fHI.getValue(1), fHI, TWOHW});
SDValue fLO = DAG.getNode(ISD::STRICT_SINT_TO_FP, DL,
{Node->getValueType(0), MVT::Other},
- {SDValue(fHI.getNode(), 1), LO});
+ {Node->getOperand(0), LO});
+
+ SDValue TF = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, fHI.getValue(1),
+ fLO.getValue(1));
// Add the two halves
SDValue Result =
DAG.getNode(ISD::STRICT_FADD, DL, {Node->getValueType(0), MVT::Other},
- {SDValue(fLO.getNode(), 1), fHI, fLO});
+ {TF, fHI, fLO});
Results.push_back(Result);
Results.push_back(Result.getValue(1));
OpenPOWER on IntegriCloud