2003-08-12 16:58:08 +02:00
|
|
|
; This testcase can be simplified by "realizing" that alloca can never return
|
|
|
|
; null.
|
2010-11-30 03:04:15 +01:00
|
|
|
; RUN: opt < %s -instcombine -simplifycfg -S | not grep br
|
2003-08-12 16:58:08 +02:00
|
|
|
|
2008-03-01 10:15:35 +01:00
|
|
|
declare i32 @bitmap_clear(...)
|
2003-08-12 16:58:08 +02:00
|
|
|
|
2008-03-01 10:15:35 +01:00
|
|
|
define i32 @oof() {
|
2003-08-12 16:58:08 +02:00
|
|
|
entry:
|
2008-03-01 10:15:35 +01: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 16:58:08 +02:00
|
|
|
|
2008-03-01 10:15:35 +01:00
|
|
|
then: ; preds = %entry
|
|
|
|
%tmp.4 = call i32 (...)* @bitmap_clear( i32* %live_head ) ; <i32> [#uses=0]
|
2003-08-12 16:58:08 +02:00
|
|
|
br label %UnifiedExitNode
|
|
|
|
|
2008-03-01 10:15:35 +01:00
|
|
|
UnifiedExitNode: ; preds = %then, %entry
|
|
|
|
ret i32 0
|
2003-08-12 16:58:08 +02:00
|
|
|
}
|
|
|
|
|