Manman Ren | f46262e | 2016-03-29 17:37:21 +0000 | [diff] [blame^] | 1 | ; 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. |
| 5 | define 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 |
| 16 | declare void @take_swiftself(i8* swiftself %addr0) |
| 17 | |
| 18 | define 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 | } |