diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-09-09 00:38:32 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-09-09 00:38:32 +0000 |
commit | 19d644d5a9cd6699e5f9f1999deb3c77b2bbdca4 (patch) | |
tree | 7101681e8ddb2825e47863eb212230c90fc4486b | |
parent | 4620360842bd8cddc5b1bad7f2f04214c91ac9cb (diff) |
For double-spaced VLD3/VLD4 instructions, copy the explicit super-register use
operand from the pseudo instruction to the new instruction as an implicit use.
This will preserve any other flags (e.g., kill) on the operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113456 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMExpandPseudoInsts.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/lib/Target/ARM/ARMExpandPseudoInsts.cpp index 031ac7aa87..3988a84eed 100644 --- a/lib/Target/ARM/ARMExpandPseudoInsts.cpp +++ b/lib/Target/ARM/ARMExpandPseudoInsts.cpp @@ -122,13 +122,17 @@ void ARMExpandPseudo::ExpandVLD(MachineBasicBlock::iterator &MBBI, MIB.addOperand(MI.getOperand(OpIdx++)); MIB = AddDefaultPred(MIB); - TransferImpOps(MI, MIB, MIB); - // For an instruction writing the odd subregs, add an implicit use of the - // super-register because the even subregs were loaded separately. - if (RegSpc == EvenDblSpc || RegSpc == OddDblSpc) - MIB.addReg(DstReg, RegState::Implicit); + // For an instruction writing double-spaced subregs, the pseudo instruction + // has an extra operand that is a use of the super-register. Copy that over + // to the new instruction as an implicit operand. + if (RegSpc == EvenDblSpc || RegSpc == OddDblSpc) { + MachineOperand MO = MI.getOperand(OpIdx); + MO.setImplicit(true); + MIB.addOperand(MO); + } // Add an implicit def for the super-register. MIB.addReg(DstReg, RegState::ImplicitDefine | getDeadRegState(DstIsDead)); + TransferImpOps(MI, MIB, MIB); MI.eraseFromParent(); } |