blob: 81a02771a7c0a8acbacc1425542caba73c212e8e [file] [log] [blame]
Chris Lattnerdf422ba2002-09-10 04:54:44 +00001; Induction variable pass is doing bad things with pointer induction vars,
2; trying to do arithmetic on them directly.
3;
Misha Brukmanedf4bab2003-09-16 15:29:54 +00004; RUN: llvm-as < %s | opt -indvars
Chris Lattnerdf422ba2002-09-10 04:54:44 +00005;
6void %test(int %A, uint %S, sbyte* %S) {
7
8 br label %Loop
9Loop:
10 %PIV = phi sbyte* [%S, %0], [%PIVNext, %Loop]
11
12 %PIV = cast sbyte* %PIV to ulong
13 %PIVNext = add ulong %PIV, 8
14 %PIVNext = cast ulong %PIVNext to sbyte*
15 br label %Loop
16}