Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 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 | } |