Simplify some getNode calls.
[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 i16 8               ; <i16*> [#uses=2]
7
8 define i16 @test(i32* %P) {
9         %X = load i16* @B               ; <i16> [#uses=1]
10         store i32 7, i32* %P
11         %Y = load i16* @B               ; <i16> [#uses=1]
12         %Z = sub i16 %Y, %X             ; <i16> [#uses=1]
13         ret i16 %Z
14 }
15