temporarily revert r123526. While working on a follow-on patch I

realize that ConstantFoldTerminator doesn't preserve dominfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-01-15 07:51:19 +00:00
parent eeba3f5695
commit 6ccb5ef1b5
2 changed files with 3 additions and 4 deletions

View File

@ -1071,9 +1071,6 @@ bool CodeGenPrepare::OptimizeInst(Instruction *I) {
if (CallInst *CI = dyn_cast<CallInst>(I))
return OptimizeCallInst(CI);
if (isa<TerminatorInst>(I))
return ConstantFoldTerminator(I->getParent());
return false;
}

View File

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