Skip to content

Commit 7b5505b

Browse files
author
Kai Luo
authored
[PowerPC] Change registers used in test due to ABI breakage. NFC. (#70758)
Usage of `r30` and `r31` has broken current traceback table's convention on AIX. Avoid using CSRs in livein list.
1 parent f8c8722 commit 7b5505b

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \
2+
# RUN: %s -o - | FileCheck %s
3+
4+
---
5+
name: foo
6+
alignment: 8
7+
tracksRegLiveness: true
8+
body: |
9+
bb.0.entry:
10+
liveins: $x3, $x4, $x5, $x6
11+
; CHECK-LABEL: .foo
12+
; CHECK: lq 2, 128(4)
13+
; CHECK: lqarx 28, 5, 6
14+
; CHECK: stqcx. 28, 5, 6
15+
; CHECK: stq 2, 128(4)
16+
$g8p1 = LQ 128, $x4
17+
$g8p14 = LQARX $x5, $x6
18+
STQCX $g8p14, $x5, $x6, implicit-def $cr0
19+
STQ $g8p1, 128, $x4
20+
$x3 = COPY $x6
21+
BLR8 implicit $lr8, implicit undef $rm, implicit $x3
22+
...
23+
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \
1+
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
22
# RUN: %s -o - | FileCheck %s
33

44
---
@@ -7,17 +7,17 @@ alignment: 8
77
tracksRegLiveness: true
88
body: |
99
bb.0.entry:
10-
liveins: $x3, $x4, $x30, $x31
11-
; CHECK-LABEL: .foo
10+
liveins: $x3, $x4, $x5, $x6
11+
; CHECK-LABEL: foo
1212
; CHECK: lq 2, 128(4)
13-
; CHECK: lqarx 28, 30, 31
14-
; CHECK: stqcx. 28, 30, 31
13+
; CHECK: lqarx 28, 5, 6
14+
; CHECK: stqcx. 28, 5, 6
1515
; CHECK: stq 2, 128(4)
1616
$g8p1 = LQ 128, $x4
17-
$g8p14 = LQARX $x30, $x31
18-
STQCX $g8p14, $x30, $x31, implicit-def $cr0
17+
$g8p14 = LQARX $x5, $x6
18+
STQCX $g8p14, $x5, $x6, implicit-def $cr0
1919
STQ $g8p1, 128, $x4
20-
$x3 = COPY $x31
20+
$x3 = COPY $x6
2121
BLR8 implicit $lr8, implicit undef $rm, implicit $x3
2222
...
2323

0 commit comments

Comments
 (0)