~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/DeadArgElim/2008-06-23-DeadAfterLive.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -deadargelim -die -S > %t
 
2
; RUN: cat %t | grep 123
 
3
 
 
4
; This test tries to catch wrongful removal of return values for a specific case
 
5
; that was breaking llvm-gcc builds.
 
6
 
 
7
; This function has a live return value, it is used by @alive.
 
8
define internal i32 @test5() {
 
9
  ret i32 123 
 
10
}
 
11
 
 
12
; This function doesn't use the return value @test5 and tries to lure DAE into
 
13
; marking @test5's return value dead because only this call is unused.
 
14
define i32 @dead() {
 
15
  %DEAD = call i32 @test5()
 
16
  ret i32 0
 
17
}
 
18
 
 
19
; This function ensures the retval of @test5 is live.
 
20
define i32 @alive() {
 
21
  %LIVE = call i32 @test5()
 
22
  ret i32 %LIVE
 
23
}