Duncan Sands | 35138e3 | 2009-12-08 10:10:20 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -globalopt -S | FileCheck %s |
Duncan Sands | e7f431f | 2009-02-15 09:56:08 +0000 | [diff] [blame] | 2 | |
| 3 | define internal void @f() { |
Duncan Sands | 35138e3 | 2009-12-08 10:10:20 +0000 | [diff] [blame^] | 4 | ; CHECK-NOT: @f |
| 5 | ; CHECK: define void @a |
Duncan Sands | e7f431f | 2009-02-15 09:56:08 +0000 | [diff] [blame] | 6 | ret void |
| 7 | } |
| 8 | |
| 9 | @a = alias void ()* @f |
| 10 | |
| 11 | define void @g() { |
| 12 | call void()* @a() |
| 13 | ret void |
| 14 | } |
Duncan Sands | 35138e3 | 2009-12-08 10:10:20 +0000 | [diff] [blame^] | 15 | |
| 16 | @b = alias internal void ()* @g |
| 17 | ; CHECK-NOT: @b |
| 18 | |
| 19 | define void @h() { |
| 20 | call void()* @b() |
| 21 | ; CHECK: call void @g |
| 22 | ret void |
| 23 | } |
| 24 | |