From: Ahmed Bougacha Date: Mon, 27 Mar 2017 18:14:20 +0000 (+0000) Subject: [GlobalISel][AArch64] Extract a variable out of an NDEBUG block. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c53cf7e424b8014a647330d8317566bba7699a6d;p=llvm [GlobalISel][AArch64] Extract a variable out of an NDEBUG block. NFC. 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 --- diff --git a/lib/Target/AArch64/AArch64InstructionSelector.cpp b/lib/Target/AArch64/AArch64InstructionSelector.cpp index 70c11c125ef..f238031fdec 100644 --- a/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -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() &&