1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --version 4
2 ; RUN: opt < %s -passes=globalopt -S | FileCheck %s
4 @f1_alias = linkonce_odr hidden alias void (), ptr @f1
5 @f2_alias = linkonce_odr hidden alias void (), ptr @f2
22 ; We cannot use `f1_alias` to replace `f1` because they are both in use
23 ; and `f1_alias` could be replaced at link time.
24 define internal void @f1() {
28 ; FIXME: We can use `f2_alias` to replace `f2` because `b2` is not in use.
29 define internal void @f2() {
33 ; CHECK: @f1_alias = linkonce_odr hidden alias void (), ptr @f1
34 ; CHECK: @f2_alias = linkonce_odr hidden alias void (), ptr @f2
36 ; CHECK-LABEL: define void @foo() local_unnamed_addr {
37 ; CHECK-NEXT: call void @f1_alias()
38 ; CHECK-NEXT: ret void
41 ; CHECK-LABEL: define void @bar() local_unnamed_addr {
42 ; CHECK-NEXT: call void @f1()
43 ; CHECK-NEXT: ret void
46 ; CHECK-LABEL: define void @baz() local_unnamed_addr {
47 ; CHECK-NEXT: call void @f2_alias()
48 ; CHECK-NEXT: ret void
51 ; CHECK-LABEL: define internal void @f1() {
52 ; CHECK-NEXT: ret void
55 ; CHECK-LABEL: define internal void @f2() {
56 ; CHECK-NEXT: ret void