mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Add <imp-def> of super-register when lowering SUBREG_TO_REG.
Patch by Tyler Nowicki! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e82fafe9e2
commit
72e7dbf88b
@ -131,13 +131,16 @@ bool ExpandPostRA::LowerSubregToReg(MachineInstr *MI) {
|
||||
} else {
|
||||
TII->copyPhysReg(*MBB, MI, MI->getDebugLoc(), DstSubReg, InsReg,
|
||||
MI->getOperand(2).isKill());
|
||||
|
||||
// Implicitly define DstReg for subsequent uses.
|
||||
MachineBasicBlock::iterator CopyMI = MI;
|
||||
--CopyMI;
|
||||
CopyMI->addRegisterDefined(DstReg);
|
||||
|
||||
// Transfer the kill/dead flags, if needed.
|
||||
if (MI->getOperand(0).isDead())
|
||||
TransferDeadFlag(MI, DstSubReg, TRI);
|
||||
DEBUG({
|
||||
MachineBasicBlock::iterator dMI = MI;
|
||||
dbgs() << "subreg: " << *(--dMI);
|
||||
});
|
||||
DEBUG(dbgs() << "subreg: " << *CopyMI);
|
||||
}
|
||||
|
||||
DEBUG(dbgs() << '\n');
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llc < %s -mcpu=generic -regalloc=fast -optimize-regalloc=0 -verify-machineinstrs -mtriple=x86_64-apple-darwin10
|
||||
; RUN: llc < %s -regalloc=fast -optimize-regalloc=0 -verify-machineinstrs -mtriple=x86_64-apple-darwin10
|
||||
; <rdar://problem/7755473>
|
||||
; PR12821
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user