mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 13:21:30 +00:00
Make LowerSubregs' debug output for EXTRACT_SUBREG consistent with
that of INSERT_SUBREG and SUBREG_TO_REG. llvm-svn: 61218
This commit is contained in:
parent
7000e62d3a
commit
ca2ab1f2c8
@ -80,7 +80,11 @@ bool LowerSubregsInstructionPass::LowerExtract(MachineInstr *MI) {
|
||||
|
||||
DOUT << "subreg: CONVERTING: " << *MI;
|
||||
|
||||
if (SrcReg != DstReg) {
|
||||
if (SrcReg == DstReg) {
|
||||
// No need to insert an identify copy instruction.
|
||||
DOUT << "subreg: eliminated!";
|
||||
} else {
|
||||
// Insert copy
|
||||
const TargetRegisterClass *TRC = TRI.getPhysicalRegisterRegClass(DstReg);
|
||||
assert(TRC == TRI.getPhysicalRegisterRegClass(SrcReg) &&
|
||||
"Extract subreg and Dst must be of same register class");
|
||||
@ -177,6 +181,7 @@ bool LowerSubregsInstructionPass::LowerInsert(MachineInstr *MI) {
|
||||
const TargetRegisterClass *TRC0= TRI.getPhysicalRegisterRegClass(DstSubReg);
|
||||
const TargetRegisterClass *TRC1= TRI.getPhysicalRegisterRegClass(InsReg);
|
||||
TII.copyRegToReg(*MBB, MI, DstSubReg, InsReg, TRC0, TRC1);
|
||||
|
||||
#ifndef NDEBUG
|
||||
MachineBasicBlock::iterator dMI = MI;
|
||||
DOUT << "subreg: " << *(--dMI);
|
||||
|
Loading…
Reference in New Issue
Block a user