52ea7bc7b0ecbf4723b01fe5bdc6a13cbe127039
[oota-llvm.git] / test / Analysis / BasicAA / global-size.ll
1 ; A store or load cannot alias a global if the accessed amount is larger then
2 ; the global.
3
4 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
5
6 %B = global short 8
7
8 implementation
9
10 short %test(int *%P) {
11         %X = load short* %B
12         store int 7, int* %P
13         %Y = load short* %B
14         %Z = sub short %Y, %X
15         ret short %Z
16 }
17