1 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
3 declare i32 @strlen(i8*) readonly
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]