| Chris Lattner | 1f71401 | 2003-08-24 05:02:26 +0000 | [diff] [blame] | 1 | ; This checks to ensure that the inline pass deletes functions if they get | 
|  | 2 | ; inlined into all of their callers. | 
|  | 3 |  | 
| Reid Spencer | 951d8dc | 2007-04-15 08:30:33 +0000 | [diff] [blame^] | 4 | ; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \ | 
|  | 5 | ; RUN:   not grep %reallysmall | 
| Chris Lattner | 1f71401 | 2003-08-24 05:02:26 +0000 | [diff] [blame] | 6 |  | 
|  | 7 | implementation | 
|  | 8 |  | 
|  | 9 | internal int %reallysmall(int %A) { | 
|  | 10 | ret int %A | 
|  | 11 | } | 
|  | 12 |  | 
|  | 13 | void %caller1() { | 
|  | 14 | call int %reallysmall(int 5) | 
|  | 15 | ret void | 
|  | 16 | } | 
|  | 17 |  | 
|  | 18 | void %caller2(int %A) { | 
|  | 19 | call int %reallysmall(int %A) | 
|  | 20 | ret void | 
|  | 21 | } | 
|  | 22 |  | 
|  | 23 | int %caller3(int %A) { | 
|  | 24 | %B = call int %reallysmall(int %A) | 
|  | 25 | ret int %B | 
|  | 26 | } |