]> granicus.if.org Git - llvm/commitdiff
[GlobalISel][AArch64] Extract a variable out of an NDEBUG block. NFC.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Mon, 27 Mar 2017 18:14:20 +0000 (18:14 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Mon, 27 Mar 2017 18:14:20 +0000 (18:14 +0000)
r298863 used PtrReg, but that's never defined in release builds. Fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298869 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64InstructionSelector.cpp

index 70c11c125ef6560f27958b7f68cbd16730b45ceb..f238031fdec5039f0a12d0ce4022a08df0963cec 100644 (file)
@@ -754,10 +754,10 @@ bool AArch64InstructionSelector::select(MachineInstr &I) const {
       return false;
     }
 
-#ifndef NDEBUG
-    // Sanity-check the pointer register.
     const unsigned PtrReg = I.getOperand(1).getReg();
+#ifndef NDEBUG
     const RegisterBank &PtrRB = *RBI.getRegBank(PtrReg, MRI, TRI);
+    // Sanity-check the pointer register.
     assert(PtrRB.getID() == AArch64::GPRRegBankID &&
            "Load/Store pointer operand isn't a GPR");
     assert(MRI.getType(PtrReg).isPointer() &&