summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-08-30 18:10:48 +0000
committerBob Wilson <bob.wilson@apple.com>2010-08-30 18:10:48 +0000
commite2f8bdac14c92de971852eb41dd0f70d202953f4 (patch)
treebb70e49458a1a82996bc0624b190f8026c09e9a1
parent3b7918625c89a4ad158fc9168e6e818f94385d21 (diff)
downloadbcm5719-llvm-e2f8bdac14c92de971852eb41dd0f70d202953f4.tar.gz
bcm5719-llvm-e2f8bdac14c92de971852eb41dd0f70d202953f4.zip
When expanding NEON VST pseudo instructions, if the original super-register
operand is killed, add it to the expanded instruction as an implicit kill operand instead of marking the individual subregs with kill flags. This should work better in general and also handles the case for VST3 where one of the subregs was not referenced in the expanded instruction and so was not marked killed. llvm-svn: 112494
-rw-r--r--llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index f39e00e4bae..285674d64d3 100644
--- a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -118,14 +118,16 @@ void ARMExpandPseudo::ExpandVST(MachineBasicBlock::iterator &MBBI,
D3 = TRI->getSubReg(SrcReg, ARM::dsub_7);
}
- MIB.addReg(D0, getKillRegState(SrcIsKill))
- .addReg(D1, getKillRegState(SrcIsKill));
+ MIB.addReg(D0).addReg(D1);
if (NumRegs > 2)
- MIB.addReg(D2, getKillRegState(SrcIsKill));
+ MIB.addReg(D2);
if (NumRegs > 3)
- MIB.addReg(D3, getKillRegState(SrcIsKill));
+ MIB.addReg(D3);
MIB = AddDefaultPred(MIB);
TransferImpOps(MI, MIB, MIB);
+ if (SrcIsKill)
+ // Add an implicit kill for the super-reg.
+ (*MIB).addRegisterKilled(SrcReg, TRI, true);
MI.eraseFromParent();
}
OpenPOWER on IntegriCloud