blob: 5e752494a54dd43cf2965042235a5656255d1075 [file] [log] [blame]
Chris Lattnerbfee2cc2004-11-26 19:19:28 +00001; A store or load cannot alias a global if the accessed amount is larger then
2; the global.
3
Reid Spencerd0e30dc2006-12-02 04:23:10 +00004; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
Chris Lattnerbfee2cc2004-11-26 19:19:28 +00005
6%B = global short 8
7
8implementation
9
10short %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