[llvm] r298869 - [GlobalISel][AArch64] Extract a variable out of an NDEBUG block. NFC.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 11:14:21 PDT 2017
Author: ab
Date: Mon Mar 27 13:14:20 2017
New Revision: 298869
URL: http://llvm.org/viewvc/llvm-project?rev=298869&view=rev
Log:
[GlobalISel][AArch64] Extract a variable out of an NDEBUG block. NFC.
r298863 used PtrReg, but that's never defined in release builds. Fix it.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp?rev=298869&r1=298868&r2=298869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp Mon Mar 27 13:14:20 2017
@@ -754,10 +754,10 @@ bool AArch64InstructionSelector::select(
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() &&
More information about the llvm-commits
mailing list