mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 11:26:08 +00:00
Allow SMUL_LOHI and UMUL_LOHI to be narrow to MUL on targets where MUL is Custom rather than Legal. Even if the target is doing some kind of expansion for MUL, it's pretty much guaranteed to be more efficent than whatever it does for SMUL_LOHI or UMUL_LOHI!
llvm-svn: 199678
This commit is contained in:
parent
b9023ed0f6
commit
fb00d5bc7c
@ -2249,7 +2249,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
|
||||
bool HiExists = N->hasAnyUseOfValue(1);
|
||||
if (!HiExists &&
|
||||
(!LegalOperations ||
|
||||
TLI.isOperationLegal(LoOp, N->getValueType(0)))) {
|
||||
TLI.isOperationLegalOrCustom(LoOp, N->getValueType(0)))) {
|
||||
SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
|
||||
N->op_begin(), N->getNumOperands());
|
||||
return CombineTo(N, Res, Res);
|
||||
|
Loading…
x
Reference in New Issue
Block a user