[TargetLowering] Speculative fix for a non-determinism issue between different compilers. (#190219)
The evaluation order of function arguments is unspecified by the C++ standard. We had two getNode calls as function arguments which causes the nodes to be created in a different order depending on the compiler used. This patch moves them to their own variables to ensure they are called in the same order on all compilers. Possible fix for #190148.
This commit is contained in:
parent
e97a42d5f9
commit
e2e5db8401
1 changed files with 3 additions and 3 deletions
|
|
@ -11602,10 +11602,10 @@ void TargetLowering::forceExpandMultiply(SelectionDAG &DAG, const SDLoc &dl,
|
|||
// If HiLHS and HiRHS are set, multiply them by the opposite low part and add
|
||||
// the products to Hi.
|
||||
if (HiLHS) {
|
||||
SDValue RHLL = DAG.getNode(ISD::MUL, dl, VT, HiRHS, LHS);
|
||||
SDValue RLLH = DAG.getNode(ISD::MUL, dl, VT, RHS, HiLHS);
|
||||
Hi = DAG.getNode(ISD::ADD, dl, VT, Hi,
|
||||
DAG.getNode(ISD::ADD, dl, VT,
|
||||
DAG.getNode(ISD::MUL, dl, VT, HiRHS, LHS),
|
||||
DAG.getNode(ISD::MUL, dl, VT, RHS, HiLHS)));
|
||||
DAG.getNode(ISD::ADD, dl, VT, RHLL, RLLH));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue