mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
8b6ab03c03
When a stack offset was too big to materialize in a single instruction, we were trying to do it in stages: adds xD, sp, #imm adds xD, xD, #imm Unfortunately, if xD is xzr then the second instruction doesn't exist and wouldn't do what was needed if it did. Instead we can use a temporary register for all but the last addition.
24 lines
407 B
LLVM
24 lines
407 B
LLVM
; RUN: llc -mtriple=arm64-apple-ios %s -o - | FileCheck %s
|
|
|
|
define void @foo() {
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: adds [[TMP:x[0-9]+]], sp,
|
|
; CHECK: cmn [[TMP]],
|
|
|
|
%var = alloca i32, i32 12
|
|
%var2 = alloca i32, i32 1030
|
|
%tst = icmp eq i32* %var, null
|
|
br i1 %tst, label %true, label %false
|
|
|
|
true:
|
|
call void @bar()
|
|
ret void
|
|
|
|
false:
|
|
call void @baz()
|
|
ret void
|
|
}
|
|
|
|
declare void @bar()
|
|
declare void @baz()
|