mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
1e0eab122b
assignment instructions from being moved below / above calls. rdar://8690640 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120339 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
632 B
LLVM
29 lines
632 B
LLVM
; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB2
|
|
; rdar://8690640
|
|
|
|
define i32* @t(i32* %x) nounwind {
|
|
entry:
|
|
; ARM: t:
|
|
; ARM: push
|
|
; ARM: mov r7, sp
|
|
; ARM: bl _foo
|
|
; ARM: bl _foo
|
|
; ARM: bl _foo
|
|
; ARM: ldmia sp!, {r7, pc}
|
|
|
|
; THUMB2: t:
|
|
; THUMB2: push
|
|
; THUMB2: mov r7, sp
|
|
; THUMB2: blx _foo
|
|
; THUMB2: blx _foo
|
|
; THUMB2: blx _foo
|
|
; THUMB2: pop
|
|
%0 = tail call i32* @foo(i32* %x) nounwind
|
|
%1 = tail call i32* @foo(i32* %0) nounwind
|
|
%2 = tail call i32* @foo(i32* %1) nounwind
|
|
ret i32* %2
|
|
}
|
|
|
|
declare i32* @foo(i32*)
|