aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll
blob: e2b2afd15fe7715e9fe6540f6aab65fd35029ba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; This testcase can be simplified by "realizing" that alloca can never return 
; null.
; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep 'br '

implementation   ; Functions:

declare int %bitmap_clear(...)

int %oof() {
entry:
        %live_head = alloca int         ; <int*> [#uses=2]
        %tmp.1 = setne int* %live_head, null            ; <bool> [#uses=1]
        br bool %tmp.1, label %then, label %UnifiedExitNode

then:
        %tmp.4 = call int (...)* %bitmap_clear( int* %live_head )              ; <int> [#uses=0]
        br label %UnifiedExitNode

UnifiedExitNode:
        ret int 0
}