1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/test/Transforms/IndVarsSimplify/2002-09-09-PointerIndVar.ll
2007-01-17 07:59:14 +00:00

17 lines
410 B
LLVM

; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
; RUN: llvm-upgrade < %s | llvm-as | 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
}