Manman Ren | f46262e | 2016-03-29 17:37:21 +0000 | [diff] [blame] | 1 | ; RUN: llc -verify-machineinstrs < %s -mtriple=armv7k-apple-ios8.0 -mcpu=cortex-a7 | FileCheck --check-prefix=CHECK-APPLE %s |
| 2 | ; RUN: llc -O0 -verify-machineinstrs < %s -mtriple=armv7k-apple-ios8.0 -mcpu=cortex-a7 | FileCheck --check-prefix=CHECK-O0 %s |
| 3 | |
| 4 | ; RUN: llc -verify-machineinstrs < %s -mtriple=armv7-apple-ios | FileCheck --check-prefix=CHECK-APPLE %s |
| 5 | ; RUN: llc -O0 -verify-machineinstrs < %s -mtriple=armv7-apple-ios | FileCheck --check-prefix=CHECK-O0 %s |
| 6 | |
| 7 | ; Parameter with swiftself should be allocated to r9. |
| 8 | define void @check_swiftself(i32* swiftself %addr0) { |
| 9 | ; CHECK-APPLE-LABEL: check_swiftself: |
| 10 | ; CHECK-O0-LABEL: check_swiftself: |
| 11 | |
| 12 | %val0 = load volatile i32, i32* %addr0 |
| 13 | ; CHECK-APPLE: ldr r{{.*}}, [r9] |
| 14 | ; CHECK-O0: ldr r{{.*}}, [r9] |
| 15 | ret void |
| 16 | } |
| 17 | |
| 18 | @var8_3 = global i8 0 |
| 19 | declare void @take_swiftself(i8* swiftself %addr0) |
| 20 | |
| 21 | define void @simple_args() { |
| 22 | ; CHECK-APPLE-LABEL: simple_args: |
| 23 | ; CHECK-O0-LABEL: simple_args: |
| 24 | |
| 25 | call void @take_swiftself(i8* @var8_3) |
| 26 | ; CHECK-APPLE: add r9, pc |
| 27 | ; CHECK-APPLE: bl {{_?}}take_swiftself |
| 28 | ; CHECK-O0: add r9, pc |
| 29 | ; CHECK-O0: bl {{_?}}take_swiftself |
| 30 | |
| 31 | ret void |
| 32 | } |