blob: f93f8f3982259f00784873450361662b7e5f0a5f [file] [log] [blame]
Manman Renf46262e2016-03-29 17:37:21 +00001; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-apple-ios | FileCheck --check-prefix=CHECK-APPLE %s
2; RUN: llc -O0 -verify-machineinstrs < %s -mtriple=aarch64-apple-ios | FileCheck --check-prefix=CHECK-O0 %s
3
4; Parameter with swiftself should be allocated to x9.
5define void @check_swiftself(i32* swiftself %addr0) {
6; CHECK-APPLE-LABEL: check_swiftself:
7; CHECK-O0-LABEL: check_swiftself:
8
9 %val0 = load volatile i32, i32* %addr0
10; CHECK-APPLE: ldr w{{.*}}, [x9]
11; CHECK-O0: ldr w{{.*}}, [x9]
12 ret void
13}
14
15@var8_3 = global i8 0
16declare void @take_swiftself(i8* swiftself %addr0)
17
18define void @simple_args() {
19; CHECK-APPLE-LABEL: simple_args:
20; CHECK-O0-LABEL: simple_args:
21
22 call void @take_swiftself(i8* @var8_3)
23; CHECK-APPLE: add x9,
24; CHECK-APPLE: bl {{_?}}take_swiftself
25; CHECK-O0: add x9,
26; CHECK-O0: bl {{_?}}take_swiftself
27
28 ret void
29}