mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
410 B
LLVM
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
|
|
}
|