Use InstrSlots::NUM rather than pre-dividing by four. Also, mark this const.
[oota-llvm.git] / test / Analysis / LoadVN / call_cse.ll
1 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
2
3 declare i32 @strlen(i8*) readonly
4
5 define i32 @test(i8* %P) {
6         %X = call i32 @strlen( i8* %P ) readonly                ; <i32> [#uses=2]
7         %A = add i32 %X, 14             ; <i32> [#uses=1]
8         %Y = call i32 @strlen( i8* %P ) readonly                ; <i32> [#uses=1]
9         %Z = sub i32 %X, %Y             ; <i32> [#uses=1]
10         %B = add i32 %A, %Z             ; <i32> [#uses=1]
11         ret i32 %B
12 }