Chris Lattner | 2c8efdb | 2004-03-15 05:44:29 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | 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 | } |