Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; This is a test case for the expression analysis code, not really indvars. |
2 | ; It was assuming any constant of int type was a ConstantInteger. | ||||
3 | ; | ||||
4 | ; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | ||||
5 | |||||
6 | %X = global int 7 | ||||
7 | |||||
8 | void %test(int %A) { | ||||
9 | br label %Loop | ||||
10 | Loop: | ||||
11 | %IV = phi int [%A, %0], [%IVNext, %Loop] | ||||
12 | %IVNext = add int %IV, cast (int* %X to int) | ||||
13 | br label %Loop | ||||
14 | } |