Revert the main portion of r31856. It was causing BranchFolding
authorDan Gohman <gohman@apple.com>
Thu, 22 Oct 2009 00:03:58 +0000 (00:03 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 22 Oct 2009 00:03:58 +0000 (00:03 +0000)
commit6d31268a7dc9854fa5a5cb9227ba9a15c5898414
treed576ce525ca584fd1497c2c0bf8bb80ac2052712
parent49708ad993529611cedfbe49ae44bb10beb73abe
Revert the main portion of r31856. It was causing BranchFolding
to break up CFG diamonds by banishing one of the blocks to the end of
the function, which is bad for code density and branch size.

This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the
benchmark cited as the reason for the change, however I've examined
the code and it looks more like a case of gaming a particular
branch than of being generally applicable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84803 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BranchFolding.cpp
test/CodeGen/CellSPU/2009-01-01-BrCond.ll
test/CodeGen/Generic/switch-lower-feature-2.ll
test/CodeGen/X86/loop-blocks.ll