Chris Lattner | 843c80f | 2003-04-16 22:46:16 +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: as < %s | 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 | } |