mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
DAG: Reorder conditions
This commit is contained in:
parent
bd46706b1f
commit
a1422bf906
@ -4431,8 +4431,8 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
|
||||
}
|
||||
|
||||
// fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
|
||||
if (DAG.isConstantIntBuildVectorOrConstantInt(N1) &&
|
||||
N0.getOpcode() == ISD::ADD &&
|
||||
if (N0.getOpcode() == ISD::ADD &&
|
||||
DAG.isConstantIntBuildVectorOrConstantInt(N1) &&
|
||||
DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) &&
|
||||
isMulAddWithConstProfitable(N, N0, N1))
|
||||
return DAG.getNode(
|
||||
|
Loading…
Reference in New Issue
Block a user