summaryrefslogtreecommitdiffstats
path: root/clang/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
commitbe614c735c136bb25c66b6d65079de12477cb91e (patch)
tree9e055ceb858f2e54c77f649e2559225c7dc99f04 /clang/lib/CodeGen/CodeGenFunction.cpp
parent81c22c2faef9378a0e79c02ca58b055b3e2d0ec5 (diff)
downloadbcm5719-llvm-be614c735c136bb25c66b6d65079de12477cb91e.tar.gz
bcm5719-llvm-be614c735c136bb25c66b6d65079de12477cb91e.zip
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. llvm-svn: 199865
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index cffbca37bdd..db629bf4920 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud