Skip to content

Commit

Permalink
[PowerPC] Change registers used in test due to ABI breakage. NFC. (#7…
Browse files Browse the repository at this point in the history
…0758)

Usage of `r30` and `r31` has broken current traceback table's convention
on AIX. Avoid using CSRs in livein list.
  • Loading branch information
bzEq committed Nov 2, 2023
1 parent f8c8722 commit 7b5505b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
23 changes: 23 additions & 0 deletions llvm/test/CodeGen/PowerPC/ldst-16-byte-asm-aix.mir
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \
# RUN: %s -o - | FileCheck %s

---
name: foo
alignment: 8
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $x3, $x4, $x5, $x6
; CHECK-LABEL: .foo
; CHECK: lq 2, 128(4)
; CHECK: lqarx 28, 5, 6
; CHECK: stqcx. 28, 5, 6
; CHECK: stq 2, 128(4)
$g8p1 = LQ 128, $x4
$g8p14 = LQARX $x5, $x6
STQCX $g8p14, $x5, $x6, implicit-def $cr0
STQ $g8p1, 128, $x4
$x3 = COPY $x6
BLR8 implicit $lr8, implicit undef $rm, implicit $x3
...

16 changes: 8 additions & 8 deletions llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \
# RUN: llc -simplify-mir -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
# RUN: %s -o - | FileCheck %s

---
Expand All @@ -7,17 +7,17 @@ alignment: 8
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $x3, $x4, $x30, $x31
; CHECK-LABEL: .foo
liveins: $x3, $x4, $x5, $x6
; CHECK-LABEL: foo
; CHECK: lq 2, 128(4)
; CHECK: lqarx 28, 30, 31
; CHECK: stqcx. 28, 30, 31
; CHECK: lqarx 28, 5, 6
; CHECK: stqcx. 28, 5, 6
; CHECK: stq 2, 128(4)
$g8p1 = LQ 128, $x4
$g8p14 = LQARX $x30, $x31
STQCX $g8p14, $x30, $x31, implicit-def $cr0
$g8p14 = LQARX $x5, $x6
STQCX $g8p14, $x5, $x6, implicit-def $cr0
STQ $g8p1, 128, $x4
$x3 = COPY $x31
$x3 = COPY $x6
BLR8 implicit $lr8, implicit undef $rm, implicit $x3
...

0 comments on commit 7b5505b

Please sign in to comment.