Files
clang-p2996/llvm/test/CodeGen/X86/swift-async-reg-win64.ll
Saleem Abdulrasool 8c8dbc1082 X86: pass swift_async context in R14 on Win64
Pass swift_async context in a callee-saved register rather than as a
regular parameter.  This is similar to the Swift `self` and `error`
parameters.
2021-06-14 11:02:21 -07:00

18 lines
398 B
LLVM

; RUN: llc -mtriple x86_64-unknown-windows-msvc %s -o - | FileCheck %s
; RUN: llc -mtriple x86_64-unknown-windows-msvc %s -o - -fast-isel | FileCheck %s
define i8* @argument(i8* swiftasync %in) {
ret i8* %in
}
; CHECK-LABEL: argument:
; CHECK: movq %r14, %rax
define void @call(i8* %in) {
call i8* @argument(i8* swiftasync %in)
ret void
}
; CHECK-LABEL: call:
; CHECK: movq %rcx, %r14