Add a test case for PR1434
[oota-llvm.git] / test / Analysis / LoadVN / call_cse.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
2 declare int %strlen(sbyte*)
3
4 int %test(sbyte* %P) {
5         %X = call int %strlen(sbyte* %P)
6         %A = add int %X, 14
7         %Y = call int %strlen(sbyte* %P)
8         %Z = sub int %X, %Y
9         %B = add int %A, %Z
10         ret int %B
11 }