brintos

brintos / llvm-project-archived public Read only

0
0
Text · 850 B · 488a88f Raw
29 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin %s -o - | FileCheck %s2 3 4declare swifttailcc void @swifttail_callee()5define swifttailcc void @swifttail() {6; CHECK-LABEL: swifttail:7; CHECK-NOT: popq %r148  call void asm "","~{r14}"()9  tail call swifttailcc void @swifttail_callee()10  ret void11}12 13define swifttailcc void @no_preserve_swiftself() {14; CHECK-LABEL: no_preserve_swiftself:15; CHECK-NOT: popq %r1316  call void asm "","~{r13}"()17  ret void18}19 20declare swifttailcc ptr @SwiftSelf(ptr swiftasync %context, ptr swiftself %closure)21define swiftcc ptr @CallSwiftSelf(ptr swiftself %closure, ptr %context) {22; CHECK-LABEL: CallSwiftSelf:23; CHECK: pushq %r1324  ;call void asm "","~{r13}"() ; We get a push r13 but why not with the call25  ; below?26  %res = call swifttailcc ptr @SwiftSelf(ptr swiftasync %context, ptr swiftself %closure)27  ret ptr %res28}29