Skip to content

Commit 9e9b0f4

Browse files
committed
[PowerPC] Support ppc-asm-full-reg-names for AIX
Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D94282
1 parent 12cbc8c commit 9e9b0f4

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,6 @@ const char *PPCInstPrinter::getVerboseConditionRegName(unsigned RegNum,
631631
// showRegistersWithPrefix - This method determines whether registers
632632
// should be number-only or include the prefix.
633633
bool PPCInstPrinter::showRegistersWithPrefix() const {
634-
if (TT.getOS() == Triple::AIX)
635-
return false;
636634
return FullRegNamesWithPercent || FullRegNames;
637635
}
638636

llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-cmpb-32.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
define i64 @test_cmpb(i64 %a, i64 %b) {
66
; CHECK-LABEL: test_cmpb:
77
; CHECK: # %bb.0: # %entry
8-
; CHECK-NEXT: cmpb 4, 4, 6
9-
; CHECK-NEXT: cmpb 3, 3, 5
8+
; CHECK-NEXT: cmpb r4, r4, r6
9+
; CHECK-NEXT: cmpb r3, r3, r5
1010
; CHECK-NEXT: blr
1111
entry:
1212
%0 = trunc i64 %a to i32

llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync-32.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
define dso_local i32 @test_builtin_ppc_popcntb_i32(i32 %a) local_unnamed_addr {
66
; CHECK-LABEL: test_builtin_ppc_popcntb_i32:
77
; CHECK: # %bb.0: # %entry
8-
; CHECK-NEXT: popcntb 3, 3
8+
; CHECK-NEXT: popcntb r3, r3
99
; CHECK-NEXT: blr
1010
entry:
1111
%popcntb = tail call i32 @llvm.ppc.popcntb.i32.i32(i32 %a)
@@ -16,8 +16,8 @@ declare i32 @llvm.ppc.popcntb.i32.i32(i32)
1616
define dso_local void @test_builtin_ppc_eieio() {
1717
; CHECK-LABEL: test_builtin_ppc_eieio:
1818
; CHECK: # %bb.0: # %entry
19-
; CHECK-NEXT: ori 2, 2, 0
20-
; CHECK-NEXT: ori 2, 2, 0
19+
; CHECK-NEXT: ori r2, r2, 0
20+
; CHECK-NEXT: ori r2, r2, 0
2121
; CHECK-NEXT: eieio
2222
; CHECK-NEXT: blr
2323
entry:
@@ -29,8 +29,8 @@ declare void @llvm.ppc.eieio()
2929
define dso_local void @test_builtin_ppc_iospace_eieio() {
3030
; CHECK-LABEL: test_builtin_ppc_iospace_eieio:
3131
; CHECK: # %bb.0: # %entry
32-
; CHECK-NEXT: ori 2, 2, 0
33-
; CHECK-NEXT: ori 2, 2, 0
32+
; CHECK-NEXT: ori r2, r2, 0
33+
; CHECK-NEXT: ori r2, r2, 0
3434
; CHECK-NEXT: eieio
3535
; CHECK-NEXT: blr
3636
entry:

llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync-64.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ define dso_local i64 @test_builtin_ppc_popcntb_i64(i64 %a) local_unnamed_addr {
1414
;
1515
; CHECK-AIX-LABEL: test_builtin_ppc_popcntb_i64:
1616
; CHECK-AIX: # %bb.0: # %entry
17-
; CHECK-AIX-NEXT: popcntb 3, 3
17+
; CHECK-AIX-NEXT: popcntb r3, r3
1818
; CHECK-AIX-NEXT: blr
1919
entry:
2020
%popcntb = tail call i64 @llvm.ppc.popcntb.i64.i64(i64 %a)
@@ -32,8 +32,8 @@ define dso_local void @test_builtin_ppc_eieio() {
3232
;
3333
; CHECK-AIX-LABEL: test_builtin_ppc_eieio:
3434
; CHECK-AIX: # %bb.0: # %entry
35-
; CHECK-AIX-NEXT: ori 2, 2, 0
36-
; CHECK-AIX-NEXT: ori 2, 2, 0
35+
; CHECK-AIX-NEXT: ori r2, r2, 0
36+
; CHECK-AIX-NEXT: ori r2, r2, 0
3737
; CHECK-AIX-NEXT: eieio
3838
; CHECK-AIX-NEXT: blr
3939
entry:
@@ -52,8 +52,8 @@ define dso_local void @test_builtin_ppc_iospace_eieio() {
5252
;
5353
; CHECK-AIX-LABEL: test_builtin_ppc_iospace_eieio:
5454
; CHECK-AIX: # %bb.0: # %entry
55-
; CHECK-AIX-NEXT: ori 2, 2, 0
56-
; CHECK-AIX-NEXT: ori 2, 2, 0
55+
; CHECK-AIX-NEXT: ori r2, r2, 0
56+
; CHECK-AIX-NEXT: ori r2, r2, 0
5757
; CHECK-AIX-NEXT: eieio
5858
; CHECK-AIX-NEXT: blr
5959
entry:
@@ -103,8 +103,8 @@ define dso_local void @test_builtin_ppc_icbt() {
103103
;
104104
; CHECK-AIX-LABEL: test_builtin_ppc_icbt:
105105
; CHECK-AIX: # %bb.0: # %entry
106-
; CHECK-AIX-NEXT: ld 3, -8(1)
107-
; CHECK-AIX-NEXT: icbt 0, 0, 3
106+
; CHECK-AIX-NEXT: ld r3, -8(r1)
107+
; CHECK-AIX-NEXT: icbt 0, 0, r3
108108
; CHECK-AIX-NEXT: blr
109109
entry:
110110
%a = alloca i8*, align 8

llvm/test/CodeGen/PowerPC/reg-names.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s
22
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names < %s | FileCheck -check-prefix=CHECK-FN %s
3+
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff -ppc-asm-full-reg-names < %s | FileCheck -check-prefix=CHECK-FN %s
34
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -ppc-reg-with-percent-prefix < %s | FileCheck -check-prefix=CHECK-PN %s
45

56
define i64 @test1(i64 %a, i64 %b) {

0 commit comments

Comments
 (0)