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
This commit is contained in:
Cameron Zwarich
2011-03-11 04:54:27 +00:00
parent 4a6d735105
commit 592ca3fda9
16 changed files with 31 additions and 17 deletions

View File

@@ -14,13 +14,14 @@ entry:
br i1 %1, label %T, label %trap
; CHECK: entry:
; HECK-NEXT: ret i32 4
; CHECK-NEXT: br label %T
trap: ; preds = %0, %entry
tail call void @llvm.trap() noreturn nounwind
unreachable
T:
; CHECK: ret i32 4
ret i32 4
}