2003-08-12 14:58:08 +00:00
|
|
|
; This testcase can be simplified by "realizing" that alloca can never return
|
|
|
|
; null.
|
2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -instcombine -simplifycfg | \
|
2007-04-14 20:13:02 +00:00
|
|
|
; RUN: llvm-dis | not grep br
|
2003-08-12 14:58:08 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
declare i32 @bitmap_clear(...)
|
2003-08-12 14:58:08 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define i32 @oof() {
|
2003-08-12 14:58:08 +00:00
|
|
|
entry:
|
2008-03-01 09:15:35 +00:00
|
|
|
%live_head = alloca i32 ; <i32*> [#uses=2]
|
|
|
|
%tmp.1 = icmp ne i32* %live_head, null ; <i1> [#uses=1]
|
|
|
|
br i1 %tmp.1, label %then, label %UnifiedExitNode
|
2003-08-12 14:58:08 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
then: ; preds = %entry
|
|
|
|
%tmp.4 = call i32 (...)* @bitmap_clear( i32* %live_head ) ; <i32> [#uses=0]
|
2003-08-12 14:58:08 +00:00
|
|
|
br label %UnifiedExitNode
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
UnifiedExitNode: ; preds = %then, %entry
|
|
|
|
ret i32 0
|
2003-08-12 14:58:08 +00:00
|
|
|
}
|
|
|
|
|