[llvm] 7b5505b - [PowerPC] Change registers used in test due to ABI breakage. NFC. (#70758)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 16:08:36 PDT 2023


Author: Kai Luo
Date: 2023-11-03T07:08:33+08:00
New Revision: 7b5505b0d597eddadd5ffd4bbf80a7e8804ec809

URL: https://github.com/llvm/llvm-project/commit/7b5505b0d597eddadd5ffd4bbf80a7e8804ec809
DIFF: https://github.com/llvm/llvm-project/commit/7b5505b0d597eddadd5ffd4bbf80a7e8804ec809.diff

LOG: [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.

Added: 
    llvm/test/CodeGen/PowerPC/ldst-16-byte-asm-aix.mir

Modified: 
    llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm-aix.mir b/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm-aix.mir
new file mode 100644
index 000000000000000..1807f1b8da9f38e
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm-aix.mir
@@ -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
+...
+

diff  --git a/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir b/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir
index f82d794a1ede81d..1b19a9463815edc 100644
--- a/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir
+++ b/llvm/test/CodeGen/PowerPC/ldst-16-byte-asm.mir
@@ -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
 
 ---
@@ -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
 ...
 


        


More information about the llvm-commits mailing list