From e90895749d4b633799eac3385975cc21a6a9a2f5 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 23 Jan 2014 02:54:30 +0000 Subject: CodeGen: Fix tracking of PGO counters for the logical or operator This adds tests for both logical or and for logical and, which was already correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199865 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index cffbca37bd..db629bf492 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -966,7 +966,7 @@ void CodeGenFunction::EmitBranchOnBoolExpr(const Expr *Cond, // We have the count for entry to the RHS and for the whole expression // being true, so we can divy up True count between the short circuit and // the RHS. - uint64_t LHSCount = TrueCount - Cnt.getCount(); + uint64_t LHSCount = Cnt.getParentCount() - Cnt.getCount(); uint64_t RHSCount = TrueCount - LHSCount; ConditionalEvaluation eval(*this); -- cgit v1.2.3