Remove a few tests which no longer hold for deadargelim (since it is now
[oota-llvm.git] / test / Transforms / DeadArgElim / keepalive.ll
1 ; RUN: llvm-as < %s | opt -deadargelim | llvm-dis > %t
2 ; RUN: cat %t | grep {define internal i32 @test1() zeroext nounwind}
3 ; RUN: cat %t | grep {define internal \<\{ i32, i32 \}\> @test}
4
5 ; Check if the pass doesn't modify anything that doesn't need changing. We feed
6 ; an unused argument to each function to lure it into changing _something_ about
7 ; the function and then changing too much.
8
9 ; This checks if the return value attributes are not removed
10 define internal i32 @test1(i32 %DEADARG1) nounwind zeroext{
11         ret i32 1
12 }
13
14 ; This checks if the struct doesn't get non-packed
15 define internal <{ i32, i32 }> @test2(i32 %DEADARG1) {
16         ret <{ i32, i32 }> <{ i32 1, i32 2 }>
17 }
18
19 ; We use this external function to make sure the return values don't become dead
20 declare void @user(i32, <{ i32, i32 }>)
21
22 define void @caller() {
23         %B = call i32 @test1(i32 1)
24         %C = call <{ i32, i32 }> @test2(i32 2)
25         call void @user(i32 %B, <{ i32, i32 }> %C)
26         ret void
27 }
28