[llvm] r193649 - Removing a switch statement that contains only a default label. This resolves an MSVC warning. No functional change intended.
Aaron Ballman
aaron at aaronballman.com
Tue Oct 29 13:40:53 PDT 2013
Author: aaronballman
Date: Tue Oct 29 15:40:52 2013
New Revision: 193649
URL: http://llvm.org/viewvc/llvm-project?rev=193649&view=rev
Log:
Removing a switch statement that contains only a default label. This resolves an MSVC warning. No functional change intended.
Modified:
llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp
Modified: llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp?rev=193649&r1=193648&r2=193649&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUInstrInfo.cpp Tue Oct 29 15:40:52 2013
@@ -121,36 +121,33 @@ AMDGPUInstrInfo::loadRegFromStackSlot(Ma
bool AMDGPUInstrInfo::expandPostRAPseudo (MachineBasicBlock::iterator MI) const {
MachineBasicBlock *MBB = MI->getParent();
- switch(MI->getOpcode()) {
- default:
- if (isRegisterLoad(*MI)) {
- unsigned RegIndex = MI->getOperand(2).getImm();
- unsigned Channel = MI->getOperand(3).getImm();
- unsigned Address = calculateIndirectAddress(RegIndex, Channel);
- unsigned OffsetReg = MI->getOperand(1).getReg();
- if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
- buildMovInstr(MBB, MI, MI->getOperand(0).getReg(),
- getIndirectAddrRegClass()->getRegister(Address));
- } else {
- buildIndirectRead(MBB, MI, MI->getOperand(0).getReg(),
- Address, OffsetReg);
- }
- } else if (isRegisterStore(*MI)) {
- unsigned RegIndex = MI->getOperand(2).getImm();
- unsigned Channel = MI->getOperand(3).getImm();
- unsigned Address = calculateIndirectAddress(RegIndex, Channel);
- unsigned OffsetReg = MI->getOperand(1).getReg();
- if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
- buildMovInstr(MBB, MI, getIndirectAddrRegClass()->getRegister(Address),
- MI->getOperand(0).getReg());
- } else {
- buildIndirectWrite(MBB, MI, MI->getOperand(0).getReg(),
- calculateIndirectAddress(RegIndex, Channel),
- OffsetReg);
- }
+ if (isRegisterLoad(*MI)) {
+ unsigned RegIndex = MI->getOperand(2).getImm();
+ unsigned Channel = MI->getOperand(3).getImm();
+ unsigned Address = calculateIndirectAddress(RegIndex, Channel);
+ unsigned OffsetReg = MI->getOperand(1).getReg();
+ if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
+ buildMovInstr(MBB, MI, MI->getOperand(0).getReg(),
+ getIndirectAddrRegClass()->getRegister(Address));
} else {
- return false;
+ buildIndirectRead(MBB, MI, MI->getOperand(0).getReg(),
+ Address, OffsetReg);
}
+ } else if (isRegisterStore(*MI)) {
+ unsigned RegIndex = MI->getOperand(2).getImm();
+ unsigned Channel = MI->getOperand(3).getImm();
+ unsigned Address = calculateIndirectAddress(RegIndex, Channel);
+ unsigned OffsetReg = MI->getOperand(1).getReg();
+ if (OffsetReg == AMDGPU::INDIRECT_BASE_ADDR) {
+ buildMovInstr(MBB, MI, getIndirectAddrRegClass()->getRegister(Address),
+ MI->getOperand(0).getReg());
+ } else {
+ buildIndirectWrite(MBB, MI, MI->getOperand(0).getReg(),
+ calculateIndirectAddress(RegIndex, Channel),
+ OffsetReg);
+ }
+ } else {
+ return false;
}
MBB->erase(MI);
More information about the llvm-commits
mailing list