[PowerPC] Support ppc-asm-full-reg-names for AIX

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D94282
This commit is contained in:
Qiu Chaofan
2021-10-15 12:22:44 +08:00
parent 12cbc8cbf0
commit 9e9b0f4621
5 changed files with 15 additions and 16 deletions

View File

@@ -631,8 +631,6 @@ const char *PPCInstPrinter::getVerboseConditionRegName(unsigned RegNum,
// showRegistersWithPrefix - This method determines whether registers
// should be number-only or include the prefix.
bool PPCInstPrinter::showRegistersWithPrefix() const {
if (TT.getOS() == Triple::AIX)
return false;
return FullRegNamesWithPercent || FullRegNames;
}

View File

@@ -5,8 +5,8 @@
define i64 @test_cmpb(i64 %a, i64 %b) {
; CHECK-LABEL: test_cmpb:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: cmpb 4, 4, 6
; CHECK-NEXT: cmpb 3, 3, 5
; CHECK-NEXT: cmpb r4, r4, r6
; CHECK-NEXT: cmpb r3, r3, r5
; CHECK-NEXT: blr
entry:
%0 = trunc i64 %a to i32

View File

@@ -5,7 +5,7 @@
define dso_local i32 @test_builtin_ppc_popcntb_i32(i32 %a) local_unnamed_addr {
; CHECK-LABEL: test_builtin_ppc_popcntb_i32:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: popcntb 3, 3
; CHECK-NEXT: popcntb r3, r3
; CHECK-NEXT: blr
entry:
%popcntb = tail call i32 @llvm.ppc.popcntb.i32.i32(i32 %a)
@@ -16,8 +16,8 @@ declare i32 @llvm.ppc.popcntb.i32.i32(i32)
define dso_local void @test_builtin_ppc_eieio() {
; CHECK-LABEL: test_builtin_ppc_eieio:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: ori 2, 2, 0
; CHECK-NEXT: ori 2, 2, 0
; CHECK-NEXT: ori r2, r2, 0
; CHECK-NEXT: ori r2, r2, 0
; CHECK-NEXT: eieio
; CHECK-NEXT: blr
entry:
@@ -29,8 +29,8 @@ declare void @llvm.ppc.eieio()
define dso_local void @test_builtin_ppc_iospace_eieio() {
; CHECK-LABEL: test_builtin_ppc_iospace_eieio:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: ori 2, 2, 0
; CHECK-NEXT: ori 2, 2, 0
; CHECK-NEXT: ori r2, r2, 0
; CHECK-NEXT: ori r2, r2, 0
; CHECK-NEXT: eieio
; CHECK-NEXT: blr
entry:

View File

@@ -14,7 +14,7 @@ define dso_local i64 @test_builtin_ppc_popcntb_i64(i64 %a) local_unnamed_addr {
;
; CHECK-AIX-LABEL: test_builtin_ppc_popcntb_i64:
; CHECK-AIX: # %bb.0: # %entry
; CHECK-AIX-NEXT: popcntb 3, 3
; CHECK-AIX-NEXT: popcntb r3, r3
; CHECK-AIX-NEXT: blr
entry:
%popcntb = tail call i64 @llvm.ppc.popcntb.i64.i64(i64 %a)
@@ -32,8 +32,8 @@ define dso_local void @test_builtin_ppc_eieio() {
;
; CHECK-AIX-LABEL: test_builtin_ppc_eieio:
; CHECK-AIX: # %bb.0: # %entry
; CHECK-AIX-NEXT: ori 2, 2, 0
; CHECK-AIX-NEXT: ori 2, 2, 0
; CHECK-AIX-NEXT: ori r2, r2, 0
; CHECK-AIX-NEXT: ori r2, r2, 0
; CHECK-AIX-NEXT: eieio
; CHECK-AIX-NEXT: blr
entry:
@@ -52,8 +52,8 @@ define dso_local void @test_builtin_ppc_iospace_eieio() {
;
; CHECK-AIX-LABEL: test_builtin_ppc_iospace_eieio:
; CHECK-AIX: # %bb.0: # %entry
; CHECK-AIX-NEXT: ori 2, 2, 0
; CHECK-AIX-NEXT: ori 2, 2, 0
; CHECK-AIX-NEXT: ori r2, r2, 0
; CHECK-AIX-NEXT: ori r2, r2, 0
; CHECK-AIX-NEXT: eieio
; CHECK-AIX-NEXT: blr
entry:
@@ -103,8 +103,8 @@ define dso_local void @test_builtin_ppc_icbt() {
;
; CHECK-AIX-LABEL: test_builtin_ppc_icbt:
; CHECK-AIX: # %bb.0: # %entry
; CHECK-AIX-NEXT: ld 3, -8(1)
; CHECK-AIX-NEXT: icbt 0, 0, 3
; CHECK-AIX-NEXT: ld r3, -8(r1)
; CHECK-AIX-NEXT: icbt 0, 0, r3
; CHECK-AIX-NEXT: blr
entry:
%a = alloca i8*, align 8

View File

@@ -1,5 +1,6 @@
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names < %s | FileCheck -check-prefix=CHECK-FN %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff -ppc-asm-full-reg-names < %s | FileCheck -check-prefix=CHECK-FN %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -ppc-reg-with-percent-prefix < %s | FileCheck -check-prefix=CHECK-PN %s
define i64 @test1(i64 %a, i64 %b) {