2011-12-20 18:26:50 +00:00
|
|
|
; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
|
|
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB2
|
2010-11-29 22:43:27 +00:00
|
|
|
; rdar://8690640
|
|
|
|
|
|
|
|
define i32* @t(i32* %x) nounwind {
|
|
|
|
entry:
|
2013-07-14 06:24:09 +00:00
|
|
|
; ARM-LABEL: t:
|
2010-11-29 22:43:27 +00:00
|
|
|
; ARM: push
|
|
|
|
; ARM: mov r7, sp
|
|
|
|
; ARM: bl _foo
|
|
|
|
; ARM: bl _foo
|
|
|
|
; ARM: bl _foo
|
2011-03-11 22:51:41 +00:00
|
|
|
; ARM: pop {r7, pc}
|
2010-11-29 22:43:27 +00:00
|
|
|
|
2013-07-14 06:24:09 +00:00
|
|
|
; THUMB2-LABEL: t:
|
2010-11-29 22:43:27 +00:00
|
|
|
; 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*)
|