aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/BasicAA/global-size.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-26 19:19:28 +0000
committerChris Lattner <sabre@nondot.org>2004-11-26 19:19:28 +0000
commit4e4f7312e00fe9346e54b40d0fc56533ad713f00 (patch)
tree97f86666d1ad6fa371ff6531b9020608283d1ecb /test/Analysis/BasicAA/global-size.ll
parent043e4b1084e8df0d579610d65ded9634fe4d4746 (diff)
downloadexternal_llvm-4e4f7312e00fe9346e54b40d0fc56533ad713f00.zip
external_llvm-4e4f7312e00fe9346e54b40d0fc56533ad713f00.tar.gz
external_llvm-4e4f7312e00fe9346e54b40d0fc56533ad713f00.tar.bz2
new testcase basicaa should handle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/BasicAA/global-size.ll')
-rw-r--r--test/Analysis/BasicAA/global-size.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/global-size.ll b/test/Analysis/BasicAA/global-size.ll
new file mode 100644
index 0000000..52ea7bc
--- /dev/null
+++ b/test/Analysis/BasicAA/global-size.ll
@@ -0,0 +1,17 @@
+; A store or load cannot alias a global if the accessed amount is larger then
+; the global.
+
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
+
+%B = global short 8
+
+implementation
+
+short %test(int *%P) {
+ %X = load short* %B
+ store int 7, int* %P
+ %Y = load short* %B
+ %Z = sub short %Y, %X
+ ret short %Z
+}
+