[llvm] 4977ead - [NFC][CVP] Give a better name STATISTIC() counting udiv i16 -> udiv i8 xforms
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 11:38:07 PDT 2020
Author: Roman Lebedev
Date: 2020-09-22T21:37:30+03:00
New Revision: 4977eadee56f81377049fb8763350a66cfd2d078
URL: https://github.com/llvm/llvm-project/commit/4977eadee56f81377049fb8763350a66cfd2d078
DIFF: https://github.com/llvm/llvm-project/commit/4977eadee56f81377049fb8763350a66cfd2d078.diff
LOG: [NFC][CVP] Give a better name STATISTIC() counting udiv i16 -> udiv i8 xforms
Added:
Modified:
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
index 50b7d9e229d4..db89e125e475 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
@@ -59,7 +59,8 @@ STATISTIC(NumCmps, "Number of comparisons propagated");
STATISTIC(NumReturns, "Number of return values propagated");
STATISTIC(NumDeadCases, "Number of switch cases removed");
STATISTIC(NumSDivs, "Number of sdiv converted to udiv");
-STATISTIC(NumUDivs, "Number of udivs whose width was decreased");
+STATISTIC(NumUDivURemsNarrowed,
+ "Number of udivs/urems whose width was decreased");
STATISTIC(NumAShrs, "Number of ashr converted to lshr");
STATISTIC(NumSRems, "Number of srem converted to urem");
STATISTIC(NumSExt, "Number of sext converted to zext");
@@ -649,7 +650,7 @@ static bool processUDivOrURem(BinaryOperator *Instr, LazyValueInfo *LVI) {
if (NewWidth >= Instr->getType()->getIntegerBitWidth())
return false;
- ++NumUDivs;
+ ++NumUDivURemsNarrowed;
IRBuilder<> B{Instr};
auto *TruncTy = Type::getIntNTy(Instr->getContext(), NewWidth);
auto *LHS = B.CreateTruncOrBitCast(Instr->getOperand(0), TruncTy,
More information about the llvm-commits
mailing list