| Matthias Braun | 1527baa | 2017-05-25 21:26:32 +0000 | [diff] [blame] | 1 | ; RUN: llc -mcpu=cyclone -debug-only=machine-scheduler < %s 2>&1 | FileCheck %s |
| Arnold Schwaighofer | f54b73d | 2015-05-08 23:52:00 +0000 | [diff] [blame] | 2 | |
| NAKAMURA Takumi | 7f52d6d | 2015-05-09 05:59:00 +0000 | [diff] [blame] | 3 | ; REQUIRES: asserts |
| Arnold Schwaighofer | f54b73d | 2015-05-08 23:52:00 +0000 | [diff] [blame] | 4 | |
| 5 | target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" |
| 6 | target triple = "arm64-apple-ios7.0.0" |
| 7 | |
| 8 | define void @caller2(i8* %a0, i8* %a1, i8* %a2, i8* %a3, i8* %a4, i8* %a5, i8* %a6, i8* %a7, i8* %a8, i8* %a9) { |
| 9 | entry: |
| 10 | tail call void @callee2(i8* %a1, i8* %a2, i8* %a3, i8* %a4, i8* %a5, i8* %a6, i8* %a7, i8* %a8, i8* %a9, i8* %a0) |
| 11 | ret void |
| 12 | } |
| 13 | |
| 14 | declare void @callee2(i8*, i8*, i8*, i8*, i8*, |
| 15 | i8*, i8*, i8*, i8*, i8*) |
| 16 | |
| 17 | ; Make sure there is a dependence between the load and store to the same stack |
| 18 | ; location during a tail call. Tail calls clobber the incoming argument area and |
| 19 | ; therefore it is not safe to assume argument locations are invariant. |
| 20 | ; PR23459 has a test case that we where miscompiling because of this at the |
| 21 | ; time. |
| 22 | |
| 23 | ; CHECK: Frame Objects |
| 24 | ; CHECK: fi#-4: {{.*}} fixed, at location [SP+8] |
| 25 | ; CHECK: fi#-3: {{.*}} fixed, at location [SP] |
| 26 | ; CHECK: fi#-2: {{.*}} fixed, at location [SP+8] |
| 27 | ; CHECK: fi#-1: {{.*}} fixed, at location [SP] |
| 28 | |
| Francis Visoiu Mistrih | 0b5bdce | 2017-12-15 16:33:45 +0000 | [diff] [blame] | 29 | ; CHECK: [[VRA:%.*]]:gpr64 = LDRXui %fixed-stack.3 |
| 30 | ; CHECK: [[VRB:%.*]]:gpr64 = LDRXui %fixed-stack.2 |
| 31 | ; CHECK: STRXui %{{.*}}, %fixed-stack.0 |
| Francis Visoiu Mistrih | e4fae4d5 | 2018-02-26 15:23:42 +0000 | [diff] [blame] | 32 | ; CHECK: STRXui [[VRB]]{{[^,]*}}, %fixed-stack.1 |
| Arnold Schwaighofer | f54b73d | 2015-05-08 23:52:00 +0000 | [diff] [blame] | 33 | |
| 34 | ; Make sure that there is an dependence edge between fi#-2 and fi#-4. |
| 35 | ; Without this edge the scheduler would be free to move the store accross the load. |
| 36 | |
| Francis Visoiu Mistrih | 0b5bdce | 2017-12-15 16:33:45 +0000 | [diff] [blame] | 37 | ; CHECK: SU({{.*}}): [[VRB]]:gpr64 = LDRXui %fixed-stack.2 |
| Arnold Schwaighofer | f54b73d | 2015-05-08 23:52:00 +0000 | [diff] [blame] | 38 | ; CHECK-NOT: SU |
| 39 | ; CHECK: Successors: |
| Evandro Menezes | 14ba3d7 | 2017-07-12 15:30:59 +0000 | [diff] [blame] | 40 | ; CHECK: SU([[DEPSTOREB:.*]]): Ord Latency=0 |
| 41 | ; CHECK: SU([[DEPSTOREA:.*]]): Ord Latency=0 |
| Arnold Schwaighofer | f54b73d | 2015-05-08 23:52:00 +0000 | [diff] [blame] | 42 | |
| Francis Visoiu Mistrih | 0b5bdce | 2017-12-15 16:33:45 +0000 | [diff] [blame] | 43 | ; CHECK: SU([[DEPSTOREA]]): STRXui %{{.*}}, %fixed-stack.0 |
| 44 | ; CHECK: SU([[DEPSTOREB]]): STRXui %{{.*}}, %fixed-stack.1 |