@@ -10915,57 +10915,6 @@ void TargetLowering::forceExpandMultiply(SelectionDAG &DAG, const SDLoc &dl,
10915
10915
}
10916
10916
}
10917
10917
10918
- void TargetLowering::forceExpandWideMUL (SelectionDAG &DAG, const SDLoc &dl,
10919
- bool Signed, EVT WideVT,
10920
- const SDValue LL, const SDValue LH,
10921
- const SDValue RL, const SDValue RH,
10922
- SDValue &Lo, SDValue &Hi) const {
10923
- // We can fall back to a libcall with an illegal type for the MUL if we
10924
- // have a libcall big enough.
10925
- // Also, we can fall back to a division in some cases, but that's a big
10926
- // performance hit in the general case.
10927
- RTLIB::Libcall LC = RTLIB::UNKNOWN_LIBCALL;
10928
- if (WideVT == MVT::i16 )
10929
- LC = RTLIB::MUL_I16;
10930
- else if (WideVT == MVT::i32 )
10931
- LC = RTLIB::MUL_I32;
10932
- else if (WideVT == MVT::i64 )
10933
- LC = RTLIB::MUL_I64;
10934
- else if (WideVT == MVT::i128 )
10935
- LC = RTLIB::MUL_I128;
10936
-
10937
- if (LC == RTLIB::UNKNOWN_LIBCALL || !getLibcallName (LC)) {
10938
- forceExpandMultiply (DAG, dl, /* Signed=*/ false , Lo, Hi, LL, RL, LH, RH);
10939
- } else {
10940
- // Attempt a libcall.
10941
- SDValue Ret;
10942
- TargetLowering::MakeLibCallOptions CallOptions;
10943
- CallOptions.setIsSigned (Signed);
10944
- CallOptions.setIsPostTypeLegalization (true );
10945
- if (shouldSplitFunctionArgumentsAsLittleEndian (DAG.getDataLayout ())) {
10946
- // Halves of WideVT are packed into registers in different order
10947
- // depending on platform endianness. This is usually handled by
10948
- // the C calling convention, but we can't defer to it in
10949
- // the legalizer.
10950
- SDValue Args[] = {LL, LH, RL, RH};
10951
- Ret = makeLibCall (DAG, LC, WideVT, Args, CallOptions, dl).first ;
10952
- } else {
10953
- SDValue Args[] = {LH, LL, RH, RL};
10954
- Ret = makeLibCall (DAG, LC, WideVT, Args, CallOptions, dl).first ;
10955
- }
10956
- assert (Ret.getOpcode () == ISD::MERGE_VALUES &&
10957
- " Ret value is a collection of constituent nodes holding result." );
10958
- if (DAG.getDataLayout ().isLittleEndian ()) {
10959
- // Same as above.
10960
- Lo = Ret.getOperand (0 );
10961
- Hi = Ret.getOperand (1 );
10962
- } else {
10963
- Lo = Ret.getOperand (1 );
10964
- Hi = Ret.getOperand (0 );
10965
- }
10966
- }
10967
- }
10968
-
10969
10918
void TargetLowering::forceExpandWideMUL (SelectionDAG &DAG, const SDLoc &dl,
10970
10919
bool Signed, const SDValue LHS,
10971
10920
const SDValue RHS, SDValue &Lo,
0 commit comments