From 6f4ed269b9f4d8296f2002f5d96fcc5d8a9ef7b1 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 3 Nov 2015 01:53:36 +0000 Subject: [PATCH] RegisterPressure: Improve assert message llvm-svn: 251885 --- llvm/lib/CodeGen/RegisterPressure.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp index 57dde2f2e2d0..6ff16e551be2 100644 --- a/llvm/lib/CodeGen/RegisterPressure.cpp +++ b/llvm/lib/CodeGen/RegisterPressure.cpp @@ -862,7 +862,8 @@ getUpwardPressureDelta(const MachineInstr *MI, /*const*/ PressureDiff &PDiff, unsigned MNew = MOld; // Ignore DeadDefs here because they aren't captured by PressureChange. unsigned PNew = POld + PDiffI->getUnitInc(); - assert((PDiffI->getUnitInc() >= 0) == (PNew >= POld) && "PSet overflow"); + assert((PDiffI->getUnitInc() >= 0) == (PNew >= POld) + && "PSet overflow/underflow"); if (PNew > MOld) MNew = PNew; // Check if current pressure has exceeded the limit.