xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2010-11-29-PrologueBug.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=armv7-apple-ios   | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker; rdar://8690640
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine i32* @t(i32* %x) nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t:
8*9880d681SAndroid Build Coastguard Worker; CHECK: push
9*9880d681SAndroid Build Coastguard Worker; CHECK: mov r7, sp
10*9880d681SAndroid Build Coastguard Worker; CHECK: bl _foo
11*9880d681SAndroid Build Coastguard Worker; CHECK: bl _foo
12*9880d681SAndroid Build Coastguard Worker; CHECK: bl _foo
13*9880d681SAndroid Build Coastguard Worker; CHECK: pop {r7, pc}
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker  %0 = tail call i32* @foo(i32* %x) nounwind
16*9880d681SAndroid Build Coastguard Worker  %1 = tail call i32* @foo(i32* %0) nounwind
17*9880d681SAndroid Build Coastguard Worker  %2 = tail call i32* @foo(i32* %1) nounwind
18*9880d681SAndroid Build Coastguard Worker  ret i32* %2
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Workerdeclare i32* @foo(i32*)
22