AMDGPU: Move copy handling under switch like other instructions

llvm-svn: 248172
This commit is contained in:
Matt Arsenault 2015-09-21 16:27:22 +00:00
parent b1c39429d9
commit 85441dd724
1 changed files with 10 additions and 5 deletions

View File

@ -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);