mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-28 15:54:00 +00:00
when transforming a MULHS into a wider MUL, there is no need to SRA the
result, the top bits are truncated off anyway, just use SRL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ba3c815570
commit
1a0fbe2cf4
@ -1940,7 +1940,7 @@ SDValue DAGCombiner::visitMULHS(SDNode *N) {
|
|||||||
N0 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N0);
|
N0 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N0);
|
||||||
N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1);
|
N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1);
|
||||||
N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1);
|
N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1);
|
||||||
N1 = DAG.getNode(ISD::SRA, DL, NewVT, N1,
|
N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1,
|
||||||
DAG.getConstant(SimpleSize, getShiftAmountTy()));
|
DAG.getConstant(SimpleSize, getShiftAmountTy()));
|
||||||
return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
|
return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user