forked from OSchip/llvm-project
AMDGPU: Move copy handling under switch like other instructions
llvm-svn: 248172
This commit is contained in:
parent
b1c39429d9
commit
85441dd724
|
@ -214,13 +214,18 @@ bool SIFixSGPRCopies::runOnMachineFunction(MachineFunction &MF) {
|
|||
for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end();
|
||||
I != E; ++I) {
|
||||
MachineInstr &MI = *I;
|
||||
if (MI.getOpcode() == AMDGPU::COPY && isVGPRToSGPRCopy(MI, TRI, MRI)) {
|
||||
|
||||
switch (MI.getOpcode()) {
|
||||
default:
|
||||
continue;
|
||||
case AMDGPU::COPY: {
|
||||
if (isVGPRToSGPRCopy(MI, TRI, MRI)) {
|
||||
DEBUG(dbgs() << "Fixing VGPR -> SGPR copy: " << MI);
|
||||
TII->moveToVALU(MI);
|
||||
}
|
||||
|
||||
switch (MI.getOpcode()) {
|
||||
default: continue;
|
||||
break;
|
||||
}
|
||||
case AMDGPU::PHI: {
|
||||
DEBUG(dbgs() << "Fixing PHI: " << MI);
|
||||
|
||||
|
|
Loading…
Reference in New Issue