[llvm] r375290 - [CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 14:19:27 PDT 2019
Author: lebedevri
Date: Fri Oct 18 14:19:26 2019
New Revision: 375290
URL: http://llvm.org/viewvc/llvm-project?rev=375290&view=rev
Log:
[CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats
This is really embarrassing. Those are pointers, so that offsets the
pointers, not the statistics pointed-by the pointer...
Modified:
llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp?rev=375290&r1=375289&r2=375290&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Fri Oct 18 14:19:26 2019
@@ -457,17 +457,17 @@ static void setDeducedOverflowingFlags(V
auto *Inst = dyn_cast<Instruction>(V);
if (NewNSW) {
++NumNW;
- ++OpcNW;
+ ++*OpcNW;
++NumNSW;
- ++OpcNSW;
+ ++*OpcNSW;
if (Inst)
Inst->setHasNoSignedWrap();
}
if (NewNUW) {
++NumNW;
- ++OpcNW;
+ ++*OpcNW;
++NumNUW;
- ++OpcNUW;
+ ++*OpcNUW;
if (Inst)
Inst->setHasNoUnsignedWrap();
}
More information about the llvm-commits
mailing list