diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-11 16:21:47 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-11 16:21:47 +0000 |
commit | 5aae3dcb53b89344d598eee7e1021dce7ec6345c (patch) | |
tree | 35c110b9311c64ac16cd3b628f23faae0fe1d17e /test/Analysis/TypeBasedAliasAnalysis | |
parent | 2c71f18ff7f5e1504ffeff85f643314e84e6e5d9 (diff) |
Make Sink tbaa-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/TypeBasedAliasAnalysis')
-rw-r--r-- | test/Analysis/TypeBasedAliasAnalysis/sink.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Analysis/TypeBasedAliasAnalysis/sink.ll b/test/Analysis/TypeBasedAliasAnalysis/sink.ll new file mode 100644 index 0000000000..e9bb61f602 --- /dev/null +++ b/test/Analysis/TypeBasedAliasAnalysis/sink.ll @@ -0,0 +1,20 @@ +; RUN: opt -tbaa -enable-tbaa -sink -S < %s | FileCheck %s + +; CHECK: a: +; CHECK: %f = load float* %p, !tbaa !2 +; CHECK: store float %f, float* %q + +define void @foo(float* %p, i1 %c, float* %q, float* %r) { + %f = load float* %p, !tbaa !0 + store float 0.0, float* %r, !tbaa !1 + br i1 %c, label %a, label %b +a: + store float %f, float* %q + br label %b +b: + ret void +} + +!0 = metadata !{metadata !"A", metadata !2} +!1 = metadata !{metadata !"B", metadata !2} +!2 = metadata !{metadata !"test"} |