A test case for the the ExitInMain libcall simplification.

llvm-svn: 21521
This commit is contained in:
Reid Spencer 2005-04-25 02:50:08 +00:00
parent 8edc8beacf
commit 985f484263
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,13 @@
; Test that the ExitInMainOptimization pass works correctly
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep -c 'ret int 3' | grep 1
declare void "exit"(int)
declare void "exitonly"(int)
implementation ; Functions:
int "main"() {
call void "exitonly" ( int 3 )
call void "exit" ( int 3 )
ret int 0
}

View File

@ -0,0 +1,3 @@
load_lib llvm-dg.exp
llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext