]> granicus.if.org Git - clang/commit
Revert r193994 and part of r193995
authorJustin Bogner <mail@justinbogner.com>
Fri, 22 Nov 2013 10:20:43 +0000 (10:20 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 22 Nov 2013 10:20:43 +0000 (10:20 +0000)
commite3c35ea549d5c3f3c5c54f32dbf1d791719286a9
treed435454989d8260b0247b3e6e79dd000ea594ba8
parent89242238c10141ad06225238277d70eff05e93a5
Revert r193994 and part of r193995

Not long ago I made the CodeGen of for loops simplify the condition at
-O0 in the same way we do for if and conditionals. Unfortunately this
ties how loops and simple conditions work together too tightly, which
makes features such as instrumentation based PGO awkward.

Ultimately, we should find a more general way to simplify the logic in
a given condition, but for now we'll just avoid using EmitBranchOnBool
for loops, like we already do for while and do loops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195438 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmt.cpp
test/CodeGen/branch-on-bool.c