summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-08-29 04:41:37 +0000
committerAndrew Trick <atrick@apple.com>2012-08-29 04:41:37 +0000
commitb57e225742d15348de05100f2c0293eeb2397ae0 (patch)
tree59fb16e39903df8cee7738414d201ceb8407d4f7 /llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
parent818f5ac5fc6eabef6dfaa3753ea3e5f811a9037f (diff)
downloadbcm5719-llvm-b57e225742d15348de05100f2c0293eeb2397ae0.tar.gz
bcm5719-llvm-b57e225742d15348de05100f2c0293eeb2397ae0.zip
Cleanup sloppy code. Jakob's review.
llvm-svn: 162825
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index f3c9cf4e434..4f203eac566 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -683,7 +683,7 @@ void ARMBaseInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
// Handle register classes that require multiple instructions.
unsigned BeginIdx = 0;
unsigned SubRegs = 0;
- unsigned Spacing = 1;
+ int Spacing = 1;
// Use VORRq when possible.
if (ARM::QQPRRegClass.contains(DestReg, SrcReg))
@@ -705,8 +705,7 @@ void ARMBaseInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
else if (ARM::DQuadSpcRegClass.contains(DestReg, SrcReg))
Opc = ARM::VMOVD, BeginIdx = ARM::dsub_0, SubRegs = 4, Spacing = 2;
- if (!Opc)
- llvm_unreachable("Impossible reg-to-reg copy");
+ assert(Opc && "Impossible reg-to-reg copy");
const TargetRegisterInfo *TRI = &getRegisterInfo();
MachineInstrBuilder Mov;
@@ -724,8 +723,8 @@ void ARMBaseInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
unsigned Src = TRI->getSubReg(SrcReg, BeginIdx + i*Spacing);
assert(Dst && Src && "Bad sub-register");
#ifndef NDEBUG
- DstRegs.insert(Dst);
assert(!DstRegs.count(Src) && "destructive vector copy");
+ DstRegs.insert(Dst);
#endif
Mov = BuildMI(MBB, I, I->getDebugLoc(), get(Opc), Dst)
.addReg(Src);
OpenPOWER on IntegriCloud