mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-11 23:05:31 +00:00
f2f6ce65b7
input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
37 lines
983 B
LLVM
37 lines
983 B
LLVM
; RUN: opt < %s -deadargelim -S | not grep DEADARG
|
|
|
|
; test - an obviously dead argument
|
|
define internal i32 @test(i32 %v, i32 %DEADARG1, i32* %p) {
|
|
store i32 %v, i32* %p
|
|
ret i32 %v
|
|
}
|
|
|
|
; hardertest - an argument which is only used by a call of a function with a
|
|
; dead argument.
|
|
define internal i32 @hardertest(i32 %DEADARG2) {
|
|
%p = alloca i32 ; <i32*> [#uses=1]
|
|
%V = call i32 @test( i32 5, i32 %DEADARG2, i32* %p ) ; <i32> [#uses=1]
|
|
ret i32 %V
|
|
}
|
|
|
|
; evenhardertest - recursive dead argument...
|
|
define internal void @evenhardertest(i32 %DEADARG3) {
|
|
call void @evenhardertest( i32 %DEADARG3 )
|
|
ret void
|
|
}
|
|
|
|
define internal void @needarg(i32 %TEST) {
|
|
call i32 @needarg2( i32 %TEST ) ; <i32>:1 [#uses=0]
|
|
ret void
|
|
}
|
|
|
|
define internal i32 @needarg2(i32 %TEST) {
|
|
ret i32 %TEST
|
|
}
|
|
|
|
define internal void @needarg3(i32 %TEST3) {
|
|
call void @needarg( i32 %TEST3 )
|
|
ret void
|
|
}
|
|
|