[llvm] 919588f - [PowerPC][NFC] expose issue on absol-jump-table-enabled.ll (relocation-model=pic + ppc-use-absolute-jumptables)

Ting Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 17:32:38 PDT 2023


Author: Ting Wang
Date: 2023-06-29T20:32:15-04:00
New Revision: 919588fd1049c622c3d002c72a977b31a7d72bb8

URL: https://github.com/llvm/llvm-project/commit/919588fd1049c622c3d002c72a977b31a7d72bb8
DIFF: https://github.com/llvm/llvm-project/commit/919588fd1049c622c3d002c72a977b31a7d72bb8.diff

LOG: [PowerPC][NFC] expose issue on absol-jump-table-enabled.ll (relocation-model=pic + ppc-use-absolute-jumptables)

Differential Revision: https://reviews.llvm.org/D154047

Added: 
    

Modified: 
    llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll b/llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll
index 33b5675544aa80..4ee62fa1908f94 100644
--- a/llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll
+++ b/llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll
@@ -7,6 +7,39 @@
 ; RUN:  llc -mtriple=powerpc64-unknown-linux-gnu -o - \
 ; RUN:      -ppc-use-absolute-jumptables -ppc-asm-full-reg-names \
 ; RUN:      -verify-machineinstrs %s | FileCheck %s -check-prefix=CHECK-BE
+; RUN:  llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
+; RUN:      -ppc-use-absolute-jumptables -ppc-asm-full-reg-names \
+; RUN:      -verify-machineinstrs %s | FileCheck %s -check-prefix=CHECK-AIX
+; RUN:  llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-A-PIC-LE
+; RUN:  llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-R-PIC-LE
+; RUN:  llc -mtriple=powerpc64-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-A-PIC-BE
+; RUN:  llc -mtriple=powerpc64-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-R-PIC-BE
+; RUN:  llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
+; RUN:      -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-A-PIC-AIX
+; RUN:  llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
+; RUN:      -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-R-PIC-AIX
+; RUN:  llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=true --relocation-model=static < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-A-STATIC-LE
+; RUN:  llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=false --relocation-model=static < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-R-STATIC-LE
+; RUN:  llc -mtriple=powerpc64-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=true --relocation-model=static < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-A-STATIC-BE
+; RUN:  llc -mtriple=powerpc64-unknown-linux-gnu -o - \
+; RUN:      -ppc-use-absolute-jumptables=false --relocation-model=static < %s | FileCheck %s \
+; RUN:      -check-prefix=CHECK-R-STATIC-BE
 
 %struct.node = type { i8, ptr }
 
@@ -27,6 +60,44 @@ define zeroext i32 @jumpTableTest(ptr readonly %list) {
 ; CHECK-BE:       mtctr r[[REG]]
 ; CHECK-BE:       bctr
 ; CHECK-BE:       blr
+;
+; CHECK-AIX-LABEL: jumpTableTest:
+; CHECK-AIX:       # %bb.0: # %entry
+; CHECK-AIX:       rldic r[[REG:[0-9]+]], r[[REG]], 2, 30
+; CHECK-AIX:       lwax r[[REG]], r[[REG]], r[[REG1:[0-9]+]]
+; CHECK-AIX:       mtctr r[[REG]]
+; CHECK-AIX:       bctr
+; CHECK-AIX:       blr
+;
+; CHECK-A-PIC-LE-LABEL:       .LJTI0_0:
+; CHECK-A-PIC-LE:             .long   .LBB0_6-.LJTI0_0
+;
+; CHECK-R-PIC-LE-LABEL:       .LJTI0_0:
+; CHECK-R-PIC-LE:             .long   .LBB0_6-.LJTI0_0
+;
+; CHECK-A-PIC-BE-LABEL:       .LJTI0_0:
+; CHECK-A-PIC-BE:             .long   .LBB0_9-.LJTI0_0
+;
+; CHECK-R-PIC-BE-LABEL:       .LJTI0_0:
+; CHECK-R-PIC-BE:             .long   .LBB0_9-.LJTI0_0
+;
+; CHECK-A-PIC-AIX-LABEL:      L..JTI0_0:
+; CHECK-A-PIC-AIX:            .vbyte  4, L..BB0_9-L..JTI0_0
+;
+; CHECK-R-PIC-AIX-LABEL:      L..JTI0_0:
+; CHECK-R-PIC-AIX:            .vbyte  4, L..BB0_9-L..JTI0_0
+;
+; CHECK-A-STATIC-LE-LABEL:    .LJTI0_0:
+; CHECK-A-STATIC-LE:          .quad   .LBB0_6
+;
+; CHECK-R-STATIC-LE-LABEL:    .LJTI0_0:
+; CHECK-R-STATIC-LE:          .long   .LBB0_6-.LJTI0_0
+;
+; CHECK-A-STATIC-BE-LABEL:    .LJTI0_0:
+; CHECK-A-STATIC-BE:          .quad   .LBB0_9
+;
+; CHECK-R-STATIC-BE-LABEL:    .LJTI0_0:
+; CHECK-R-STATIC-BE:          .long   .LBB0_9-.LJTI0_0
 entry:
   %cmp36 = icmp eq ptr %list, null
   br i1 %cmp36, label %while.end, label %while.body


        


More information about the llvm-commits mailing list