When optimizing for size, don't tail-merge unless it's likely to be a
authorDan Gohman <gohman@apple.com>
Fri, 13 Nov 2009 21:02:15 +0000 (21:02 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 13 Nov 2009 21:02:15 +0000 (21:02 +0000)
commitc4c550c7584b3240bda71d4339ec49c1cf731d55
treeb87f263bab10843186383b4c85cc7a064ed037e5
parent236490d870c2734203ecf26c8f104d0b3283e69e
When optimizing for size, don't tail-merge unless it's likely to be a
code-size win, and not when it's only likely to be code-size neutral,
such as when only a single instruction would be eliminated and a new
branch would be required.

This fixes rdar://7392894.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88692 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BranchFolding.cpp
test/CodeGen/X86/tail-opts.ll