Optimize trivial branches in CodeGenPrepare, which often get created from the
authorCameron Zwarich <zwarich@apple.com>
Fri, 11 Mar 2011 04:54:27 +0000 (04:54 +0000)
committerCameron Zwarich <zwarich@apple.com>
Fri, 11 Mar 2011 04:54:27 +0000 (04:54 +0000)
commit592ca3fda918c2066d9d78ed360e5fd69066fda7
treee16237cd82f87e7e41a0f442ffdd115d86de78ce
parent4a6d735105ffac5f58499ef5a5de8713b458b233
Optimize trivial branches in CodeGenPrepare, which often get created from the
lowering of objectsize intrinsics. Unfortunately, a number of tests were relying
on llc not optimizing trivial branches, so I had to add an option to allow them
to continue to test what they originally tested.

This fixes <rdar://problem/8785296> and <rdar://problem/9112893>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127459 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/ARM/constants.ll
test/CodeGen/CellSPU/jumptable.ll
test/CodeGen/Thumb/dyn-stackalloc.ll
test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll
test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll
test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll
test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
test/CodeGen/X86/2008-04-16-ReMatBug.ll
test/CodeGen/X86/MachineSink-PHIUse.ll
test/CodeGen/X86/personality.ll
test/CodeGen/X86/pr3366.ll
test/CodeGen/X86/sext-i1.ll
test/CodeGen/X86/zext-extract_subreg.ll
test/MC/ARM/simple-encoding.ll
test/Transforms/CodeGenPrepare/basic.ll