mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
A test case for the the ExitInMain libcall simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8f3848639
commit
a498747842
13
test/Transforms/SimplifyLibCalls/2005-04-24-ExitInMain.ll
Normal file
13
test/Transforms/SimplifyLibCalls/2005-04-24-ExitInMain.ll
Normal 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
|
||||
}
|
3
test/Transforms/SimplifyLibCalls/dg.exp
Normal file
3
test/Transforms/SimplifyLibCalls/dg.exp
Normal 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
|
Loading…
x
Reference in New Issue
Block a user