1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-06 20:33:54 +00:00
2003-09-16 15:29:54 +00:00

17 lines
395 B
LLVM

; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
; RUN: llvm-as < %s | opt -indvars
;
void %test(int %A, uint %S, sbyte* %S) {
br label %Loop
Loop:
%PIV = phi sbyte* [%S, %0], [%PIVNext, %Loop]
%PIV = cast sbyte* %PIV to ulong
%PIVNext = add ulong %PIV, 8
%PIVNext = cast ulong %PIVNext to sbyte*
br label %Loop
}