diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-09 19:04:59 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-09 19:04:59 +0000 |
commit | e4c6b61ebd8f2dbb6a2e51fe1d0e2bdbe17986c4 (patch) | |
tree | 5af548f33ed717c5eba0d3b48da5f1e796198ba4 /test/Transforms/GlobalOpt | |
parent | bd297bcd4a69dd14e97afae555b593a25071fb6f (diff) | |
download | external_llvm-e4c6b61ebd8f2dbb6a2e51fe1d0e2bdbe17986c4.zip external_llvm-e4c6b61ebd8f2dbb6a2e51fe1d0e2bdbe17986c4.tar.gz external_llvm-e4c6b61ebd8f2dbb6a2e51fe1d0e2bdbe17986c4.tar.bz2 |
Resolve aliases, when possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r-- | test/Transforms/GlobalOpt/alias-resolve.ll | 19 |
1 files changed, 19 insertions, 0 deletions
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 +} |