diff options
author | Duncan Sands <baldrick@free.fr> | 2009-12-08 10:10:20 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-12-08 10:10:20 +0000 |
commit | 7a154cf22830857bc184566102abd8a2ada8df94 (patch) | |
tree | 4e6b970eab49558cd0573695b5fd256f7a6d0103 /test/Transforms/GlobalOpt | |
parent | 34f849098bfb8850fa34fbd115ba9b2e55c85a32 (diff) | |
download | external_llvm-7a154cf22830857bc184566102abd8a2ada8df94.zip external_llvm-7a154cf22830857bc184566102abd8a2ada8df94.tar.gz external_llvm-7a154cf22830857bc184566102abd8a2ada8df94.tar.bz2 |
Teach GlobalOpt to delete aliases with internal linkage (after
forwarding any uses). GlobalDCE can also do this, but is only
run at -O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r-- | test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll b/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll index 5e639fd..a5be2b1 100644 --- a/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll +++ b/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll @@ -1,6 +1,8 @@ -; RUN: opt < %s -globalopt -S | grep {define void @a} +; RUN: opt < %s -globalopt -S | FileCheck %s define internal void @f() { +; CHECK-NOT: @f +; CHECK: define void @a ret void } @@ -10,3 +12,13 @@ define void @g() { call void()* @a() ret void } + +@b = alias internal void ()* @g +; CHECK-NOT: @b + +define void @h() { + call void()* @b() +; CHECK: call void @g + ret void +} + |