[SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction

Increment statistics counter NumSwitches at unswitchNontrivialInvariants() for
unswitching a non-trivial switch instruction. This is to fix a bug that it
increments NumBranches even for the case of switch instruction.
There is no functional change in this patch.

Differential Revision: https://reviews.llvm.org/D56408

llvm-svn: 351193
This commit is contained in:
Zaara Syeda 2019-01-15 15:08:01 +00:00
parent 3687c3e906
commit b7dff9c9af
1 changed files with 4 additions and 1 deletions

View File

@ -2281,7 +2281,10 @@ static void unswitchNontrivialInvariants(
if (MSSAU && VerifyMemorySSA)
MSSAU->getMemorySSA()->verifyMemorySSA();
++NumBranches;
if (BI)
++NumBranches;
else
++NumSwitches;
}
/// Recursively compute the cost of a dominator subtree based on the per-block