summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-01-23 02:54:30 +0000
committerJustin Bogner <mail@justinbogner.com>2014-01-23 02:54:30 +0000
commite90895749d4b633799eac3385975cc21a6a9a2f5 (patch)
tree0dd68a4034cdd1ca2e092ad7dbaa12b95581f7ee /lib/CodeGen/CodeGenFunction.cpp
parentff9c0c141032f7226d72b6f45e3606d89b3475cb (diff)
downloadclang-e90895749d4b633799eac3385975cc21a6a9a2f5.tar.gz
clang-e90895749d4b633799eac3385975cc21a6a9a2f5.tar.bz2
clang-e90895749d4b633799eac3385975cc21a6a9a2f5.tar.xz
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
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);