mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
Always merge profitable shifts on A9, not just when they have a single use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d78ebe1e12
commit
8f8aa815b4
@ -555,9 +555,7 @@ bool ARMDAGToDAGISel::SelectLdStSOReg(SDValue N, SDValue &Base, SDValue &Offset,
|
|||||||
if (ConstantSDNode *Sh =
|
if (ConstantSDNode *Sh =
|
||||||
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
|
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
|
||||||
ShAmt = Sh->getZExtValue();
|
ShAmt = Sh->getZExtValue();
|
||||||
if (!Subtarget->isCortexA9() ||
|
if (isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt)) {
|
||||||
(N.hasOneUse() &&
|
|
||||||
isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt))) {
|
|
||||||
Offset = N.getOperand(0).getOperand(0);
|
Offset = N.getOperand(0).getOperand(0);
|
||||||
Base = N.getOperand(1);
|
Base = N.getOperand(1);
|
||||||
} else {
|
} else {
|
||||||
@ -697,9 +695,7 @@ AddrMode2Type ARMDAGToDAGISel::SelectAddrMode2Worker(SDValue N,
|
|||||||
if (ConstantSDNode *Sh =
|
if (ConstantSDNode *Sh =
|
||||||
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
|
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
|
||||||
ShAmt = Sh->getZExtValue();
|
ShAmt = Sh->getZExtValue();
|
||||||
if (!Subtarget->isCortexA9() ||
|
if (isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt)) {
|
||||||
(N.hasOneUse() &&
|
|
||||||
isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt))) {
|
|
||||||
Offset = N.getOperand(0).getOperand(0);
|
Offset = N.getOperand(0).getOperand(0);
|
||||||
Base = N.getOperand(1);
|
Base = N.getOperand(1);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user