Testcase for feature we should support eventually

llvm-svn: 7772
This commit is contained in:
Chris Lattner 2003-08-12 14:58:08 +00:00
parent e5b8234685
commit 05e8f9cea0
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
; This testcase can be simplified by "realizing" that alloca can never return
; null.
; RUN: as < %s | opt -instcombine -simplifycfg | 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
}