]> granicus.if.org Git - llvm/commitdiff
[CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 18 Oct 2019 21:19:26 +0000 (21:19 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 18 Oct 2019 21:19:26 +0000 (21:19 +0000)
This is really embarrassing. Those are pointers, so that offsets the
pointers, not the statistics pointed-by the pointer...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375290 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/CorrelatedValuePropagation.cpp

index 4ed0f2e16c88f859e6b3aa5f6fa8c371b858a435..ba16afaa89689c381bdcf42637f6abad718aea65 100644 (file)
@@ -457,17 +457,17 @@ static void setDeducedOverflowingFlags(Value *V, Instruction::BinaryOps Opcode,
   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();
   }