mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-28 00:07:22 +00:00
Add <imp-def> operands when reloading into physregs.
When an instruction only writes sub-registers, it is still necessary to add an <imp-def> operand for the super-register. When reloading into a virtual register, rewriting will add the operand, but when loading directly into a virtual register, the <imp-def> operand is still necessary. llvm-svn: 152095
This commit is contained in:
parent
fec0accf3d
commit
d4e1cb591a
@ -935,6 +935,8 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_1, RegState::DefineNoRead, TRI);
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_2, RegState::DefineNoRead, TRI);
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_3, RegState::DefineNoRead, TRI);
|
||||
if (TargetRegisterInfo::isPhysicalRegister(DestReg))
|
||||
MIB.addReg(DestReg, RegState::ImplicitDefine);
|
||||
}
|
||||
} else
|
||||
llvm_unreachable("Unknown reg class!");
|
||||
@ -953,6 +955,8 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_5, RegState::DefineNoRead, TRI);
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_6, RegState::DefineNoRead, TRI);
|
||||
MIB = AddDReg(MIB, DestReg, ARM::dsub_7, RegState::DefineNoRead, TRI);
|
||||
if (TargetRegisterInfo::isPhysicalRegister(DestReg))
|
||||
MIB.addReg(DestReg, RegState::ImplicitDefine);
|
||||
} else
|
||||
llvm_unreachable("Unknown reg class!");
|
||||
break;
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llc < %s -verify-machineinstrs
|
||||
; RUN: llc < %s -verify-machineinstrs -O0
|
||||
; PR12177
|
||||
;
|
||||
; This test case spills a QQQQ register.
|
||||
|
Loading…
x
Reference in New Issue
Block a user