
When adjusting the Stack Pointer at the end of the function epilogue, use a callee-saved register, rather than explicitly using R4 which may not have been saved. Differential Revision: https://reviews.llvm.org/D157500
21 lines
609 B
LLVM
21 lines
609 B
LLVM
; RUN: llc -mtriple=thumbv6-apple-darwin < %s | FileCheck %s
|
|
; r8869722
|
|
|
|
%struct.state = type { i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, ptr }
|
|
%struct.info = type { i32, i32, i32, i32, i32, i32, i32, ptr }
|
|
|
|
define void @t1(ptr %v) {
|
|
%tmp6 = load i32, ptr null
|
|
%tmp8 = alloca float, i32 %tmp6
|
|
store i32 1, ptr null
|
|
br label %return
|
|
|
|
return: ; preds = %0
|
|
; CHECK: subs [[SCRATCH:r[0-7]]], r7, #7
|
|
; CHECK: subs [[SCRATCH]], #1
|
|
; CHECK: mov sp, [[SCRATCH]]
|
|
; CHECK-NEXT: pop
|
|
; CHECK-SAME: [[SCRATCH]]
|
|
ret void
|
|
}
|