From cb78d67a1a4e3b17d5801099940901740c67f526 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 6 Jun 2007 01:12:44 +0000 Subject: [PATCH] Minor statistics counting bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37451 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/IfConversion.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 836138209de..a81508f1c95 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -158,15 +158,17 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) { // Block has been already been if-converted, abort! break; case ICSimple: - case ICSimpleFalse: + case ICSimpleFalse: { + bool isRev = BBI.Kind == ICSimpleFalse; DOUT << "Ifcvt (Simple" << (BBI.Kind == ICSimpleFalse ? " false" : "") << "): BB#" << BBI.BB->getNumber() << " "; RetVal = IfConvertSimple(BBI); DOUT << (RetVal ? "succeeded!" : "failed!") << "\n"; if (RetVal) - if (BBI.Kind == ICSimple) NumSimple++; - else NumSimpleRev++; + if (isRev) NumSimple++; + else NumSimpleRev++; break; + } case ICTriangle: DOUT << "Ifcvt (Triangle): BB#" << BBI.BB->getNumber() << " "; RetVal = IfConvertTriangle(BBI); -- 2.34.1