From: Roman Lebedev Date: Fri, 18 Oct 2019 21:19:26 +0000 (+0000) Subject: [CVP] setDeducedOverflowingFlags(): actually inc per-opcode stats X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3de752ca572e91e379f5001d8e34051ea00b778;p=llvm [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... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375290 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp index 4ed0f2e16c8..ba16afaa896 100644 --- a/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ b/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -457,17 +457,17 @@ static void setDeducedOverflowingFlags(Value *V, Instruction::BinaryOps Opcode, auto *Inst = dyn_cast(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(); }