blob: 4c80e4851f41f780fb04fb9f8e496bfe2538b636 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Induction variable pass is doing bad things with pointer induction vars,
2; trying to do arithmetic on them directly.
3;
4; RUN: llvm-upgrade < %s | llvm-as | opt -indvars
5;
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}