Skip to content

Commit

Permalink
test for unpaired cases
Browse files Browse the repository at this point in the history
  • Loading branch information
nocchijiang committed Oct 9, 2023
1 parent 65fdef1 commit 24d840e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -homogeneous-prolog-epilog | FileCheck %s
; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -homogeneous-prolog-epilog | FileCheck %s --check-prefixes=CHECK-LINUX

declare void @bar(i32 %i)

define void @odd_num_callee_saved_registers(ptr swifterror %error, i32 %i) nounwind minsize {
call void asm sideeffect "mov x0, #42", "~{x0},~{x19},~{x20},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28}"() nounwind
call void @bar(i32 %i)
ret void
}

; CHECK-LABEL: _OUTLINED_FUNCTION_PROLOG_x30x29x19x20x22x23x24x25x26x27x28:
; CHECK: str x28, [sp, #-80]!
; CHECK-LABEL: _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29x19x20x22x23x24x25x26x27x28:
; CHECK: ldr x28, [sp], #96

; CHECK-LINUX-NOT: OUTLINED_FUNCTION_PROLOG:
; CHECK-LINUX-NOT: OUTLINED_FUNCTION_EPILOG:
18 changes: 0 additions & 18 deletions llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog.ll
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,3 @@ declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture)
define void @swift_async(i8* swiftasync %ctx) minsize "frame-pointer"="all" {
ret void
}

declare void @bar(i32 %i)

define void @odd_num_callee_saved_registers(ptr swifterror %error, i32 %i) nounwind minsize {
call void asm sideeffect "mov x0, #42", "~{x0},~{x19},~{x20},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28}"() nounwind
call void @bar(i32 %i)
ret void
}

; CHECK-LABEL: _OUTLINED_FUNCTION_PROLOG_x30x29x19x20x22x23x24x25x26x27x28:
; CHECK: stp x28, xzr, [sp, #-80]!
; CHECK-LABEL: _OUTLINED_FUNCTION_EPILOG_TAIL_x30x29x19x20x22x23x24x25x26x27x28:
; CHECK: ldp x28, xzr, [sp], #96

; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_PROLOG_x19x20x22x23x24x25x26x27x28x30x29:
; CHECK-LINUX: stp x29, xzr, [sp, #-8]!
; CHECK-LINUX-LABEL: OUTLINED_FUNCTION_EPILOG_TAIL_x19x20x22x23x24x25x26x27x28x30x29:
; CHECK-LINUX: ldp x29, xzr, [sp], #96

0 comments on commit 24d840e

Please sign in to comment.