Always merge profitable shifts on A9, not just when they have a single use.

llvm-svn: 141248
This commit is contained in:
Cameron Zwarich 2011-10-05 23:39:02 +00:00
parent 87aa18378e
commit 842f99a6ee
1 changed files with 2 additions and 6 deletions

View File

@ -555,9 +555,7 @@ bool ARMDAGToDAGISel::SelectLdStSOReg(SDValue N, SDValue &Base, SDValue &Offset,
if (ConstantSDNode *Sh =
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
ShAmt = Sh->getZExtValue();
if (!Subtarget->isCortexA9() ||
(N.hasOneUse() &&
isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt))) {
if (isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt)) {
Offset = N.getOperand(0).getOperand(0);
Base = N.getOperand(1);
} else {
@ -697,9 +695,7 @@ AddrMode2Type ARMDAGToDAGISel::SelectAddrMode2Worker(SDValue N,
if (ConstantSDNode *Sh =
dyn_cast<ConstantSDNode>(N.getOperand(0).getOperand(1))) {
ShAmt = Sh->getZExtValue();
if (!Subtarget->isCortexA9() ||
(N.hasOneUse() &&
isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt))) {
if (isShifterOpProfitable(N.getOperand(0), ShOpcVal, ShAmt)) {
Offset = N.getOperand(0).getOperand(0);
Base = N.getOperand(1);
} else {