From e4c6b61ebd8f2dbb6a2e51fe1d0e2bdbe17986c4 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Tue, 9 Sep 2008 19:04:59 +0000 Subject: Resolve aliases, when possible git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56001 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/GlobalOpt/alias-resolve.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/Transforms/GlobalOpt/alias-resolve.ll (limited to 'test/Transforms/GlobalOpt') diff --git a/test/Transforms/GlobalOpt/alias-resolve.ll b/test/Transforms/GlobalOpt/alias-resolve.ll new file mode 100644 index 0000000..3cae413 --- /dev/null +++ b/test/Transforms/GlobalOpt/alias-resolve.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | opt -globalopt | llvm-dis > %t +; RUN: cat %t | grep foo1 | count 1 +; RUN: cat %t | grep foo2 | count 4 +; RUN: cat %t | grep bar1 | count 1 +; RUN: cat %t | grep bar2 | count 4 + +@foo1 = alias void ()* @foo2 +@foo2 = alias weak void()* @bar1 +@bar1 = alias void ()* @bar2 + +declare void @bar2() + +define void @baz() { +entry: + call void @foo1() + call void @foo2() + call void @bar1() + ret void +} -- cgit v1.1