From: Chris Lattner Date: Fri, 26 Nov 2004 19:19:28 +0000 (+0000) Subject: new testcase basicaa should handle X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4e4f7312e00fe9346e54b40d0fc56533ad713f00;p=oota-llvm.git new testcase basicaa should handle git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18260 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/BasicAA/global-size.ll b/test/Analysis/BasicAA/global-size.ll new file mode 100644 index 00000000000..52ea7bc7b0e --- /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 +} +