Skip to content

Commit 732f63d

Browse files
author
Chen Zheng
committed
[PowerPC]set default min-jump-table-entries to 64 on PPC
Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D159050
1 parent 833b1e3 commit 732f63d

12 files changed

+89
-74
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ cl::opt<bool> DisableAutoPairedVecSt(
132132
cl::desc("disable automatically generated 32byte paired vector stores"),
133133
cl::init(true), cl::Hidden);
134134

135+
static cl::opt<unsigned> PPCMinimumJumpTableEntries(
136+
"ppc-min-jump-table-entries", cl::init(64), cl::Hidden,
137+
cl::desc("Set minimum number of entries to use a jump table on PPC"));
138+
135139
STATISTIC(NumTailCalls, "Number of tail calls");
136140
STATISTIC(NumSiblingCalls, "Number of sibling calls");
137141
STATISTIC(ShufflesHandledWithVPERM,
@@ -1432,6 +1436,12 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
14321436
setJumpIsExpensive();
14331437
}
14341438

1439+
// TODO: The default entry number is set to 64. This stops most jump table
1440+
// generation on PPC. But it is good for current PPC HWs because the indirect
1441+
// branch instruction mtctr to the jump table may lead to bad branch predict.
1442+
// Re-evaluate this value on future HWs that can do better with mtctr.
1443+
setMinimumJumpTableEntries(PPCMinimumJumpTableEntries);
1444+
14351445
setMinFunctionAlignment(Align(4));
14361446

14371447
switch (Subtarget.getCPUDirective()) {

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
; NOTE: This test case generates a jump table on PowerPC big and little endian
22
; NOTE: then verifies that the command line option to enable absolute jump
33
; NOTE: table works correctly.
4-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
4+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
55
; RUN: -ppc-use-absolute-jumptables -ppc-asm-full-reg-names \
66
; RUN: -verify-machineinstrs %s | FileCheck %s -check-prefix=CHECK-LE
7-
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - \
7+
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
88
; RUN: -ppc-use-absolute-jumptables -ppc-asm-full-reg-names \
99
; RUN: -verify-machineinstrs %s | FileCheck %s -check-prefix=CHECK-BE
10-
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
10+
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -o - \
1111
; RUN: -ppc-use-absolute-jumptables -ppc-asm-full-reg-names \
1212
; RUN: -verify-machineinstrs %s | FileCheck %s -check-prefix=CHECK-AIX
13-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
13+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
1414
; RUN: -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
1515
; RUN: -check-prefix=CHECK-A-PIC-LE
16-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
16+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
1717
; RUN: -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
1818
; RUN: -check-prefix=CHECK-R-PIC-LE
19-
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - \
19+
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
2020
; RUN: -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
2121
; RUN: -check-prefix=CHECK-A-PIC-BE
22-
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - \
22+
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
2323
; RUN: -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
2424
; RUN: -check-prefix=CHECK-R-PIC-BE
25-
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
25+
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -o - \
2626
; RUN: -ppc-use-absolute-jumptables=true --relocation-model=pic < %s | FileCheck %s \
2727
; RUN: -check-prefix=CHECK-A-PIC-AIX
28-
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -o - \
28+
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -o - \
2929
; RUN: -ppc-use-absolute-jumptables=false --relocation-model=pic < %s | FileCheck %s \
3030
; RUN: -check-prefix=CHECK-R-PIC-AIX
31-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
31+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
3232
; RUN: -ppc-use-absolute-jumptables=true --relocation-model=static < %s | FileCheck %s \
3333
; RUN: -check-prefix=CHECK-A-STATIC-LE
34-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
34+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
3535
; RUN: -ppc-use-absolute-jumptables=false --relocation-model=static < %s | FileCheck %s \
3636
; RUN: -check-prefix=CHECK-R-STATIC-LE
37-
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - \
37+
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
3838
; RUN: -ppc-use-absolute-jumptables=true --relocation-model=static < %s | FileCheck %s \
3939
; RUN: -check-prefix=CHECK-A-STATIC-BE
40-
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -o - \
40+
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
4141
; RUN: -ppc-use-absolute-jumptables=false --relocation-model=static < %s | FileCheck %s \
4242
; RUN: -check-prefix=CHECK-R-STATIC-BE
4343

llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
22
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
3-
; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \
3+
; RUN: -ppc-min-jump-table-entries=4 -code-model=small -stop-after=machine-cp < %s | FileCheck \
44
; RUN: --check-prefix=32SMALL-MIR %s
55

66
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \
7-
; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \
7+
; RUN: -ppc-min-jump-table-entries=4 -code-model=large -stop-after=machine-cp < %s | FileCheck \
88
; RUN: --check-prefix=32LARGE-MIR %s
99

1010
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
11-
; RUN: -code-model=small -stop-after=machine-cp < %s | FileCheck \
11+
; RUN: -ppc-min-jump-table-entries=4 -code-model=small -stop-after=machine-cp < %s | FileCheck \
1212
; RUN: --check-prefix=64SMALL-MIR %s
1313

1414
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \
15-
; RUN: -code-model=large -stop-after=machine-cp < %s | FileCheck \
15+
; RUN: -ppc-min-jump-table-entries=4 -code-model=large -stop-after=machine-cp < %s | FileCheck \
1616
; RUN: --check-prefix=64LARGE-MIR %s
1717

18-
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=small < %s | FileCheck \
18+
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -code-model=small < %s | FileCheck \
1919
; RUN: --check-prefixes=32SMALL-ASM,SMALL-ASM %s
2020

21-
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -code-model=large < %s | FileCheck \
21+
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -code-model=large < %s | FileCheck \
2222
; RUN: --check-prefixes=32LARGE-ASM,LARGE-ASM %s
2323

24-
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -code-model=small < %s | FileCheck \
24+
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -code-model=small < %s | FileCheck \
2525
; RUN: --check-prefixes=64SMALL-ASM,SMALL-ASM %s
2626

27-
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -code-model=large < %s | FileCheck \
27+
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -code-model=large < %s | FileCheck \
2828
; RUN: --check-prefixes=64LARGE-ASM,LARGE-ASM %s
2929

30-
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -function-sections < %s | FileCheck \
30+
; RUN: llc -mtriple powerpc-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -function-sections < %s | FileCheck \
3131
; RUN: --check-prefix=FUNC-ASM %s
3232

33-
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -function-sections < %s | FileCheck \
33+
; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -ppc-min-jump-table-entries=4 -function-sections < %s | FileCheck \
3434
; RUN: --check-prefix=FUNC-ASM %s
3535

3636
define i32 @jump_table(i32 %a) {

llvm/test/CodeGen/PowerPC/jump-table.ll

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
; RUN: | FileCheck %s
55
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-ibm-aix -stop-after=finalize-isel \
66
; RUN: | FileCheck %s
7+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -stop-after=finalize-isel \
8+
; RUN: -min-jump-table-entries=4 | FileCheck %s
9+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -stop-after=finalize-isel \
10+
; RUN: -ppc-min-jump-table-entries=4 | FileCheck %s -check-prefix=JT
11+
12+
; JT: jumpTable:
13+
; JT-NEXT: kind: label-difference32
14+
; JT-NEXT: entries:
15+
; JT-NEXT: - id: 0
716

8-
; CHECK: jumpTable:
9-
; CHECK-NEXT: kind: label-difference32
10-
; CHECK-NEXT: entries:
11-
; CHECK-NEXT: - id: 0
17+
; CHECK-NOT: jumpTable:
1218

1319
define signext i32 @jt(i32 signext %a, i32 signext %b) {
1420
entry:

llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -o - \
2+
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -ppc-min-jump-table-entries=4 -o - \
33
; RUN: -ppc-asm-full-reg-names -verify-machineinstrs %s | FileCheck %s
44

55
; Function Attrs: nounwind

llvm/test/CodeGen/PowerPC/mcm-5.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -code-model=medium <%s | FileCheck %s
2-
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -code-model=large <%s | FileCheck -check-prefix=LARGE %s
1+
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-min-jump-table-entries=4 -code-model=medium <%s | FileCheck %s
2+
; RUN: llc -verify-machineinstrs -mcpu=pwr7 -ppc-min-jump-table-entries=4 -code-model=large <%s | FileCheck -check-prefix=LARGE %s
33

44
; Test correct code generation for medium and large code model
55
; for loading the address of a jump table from the TOC.

llvm/test/CodeGen/PowerPC/p10-spill-crgt.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3-
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
3+
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -ppc-min-jump-table-entries=4 < %s | \
44
; RUN: FileCheck %s
55
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
6-
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
6+
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -ppc-min-jump-table-entries=4 < %s | \
77
; RUN: FileCheck %s --check-prefix=CHECK-BE
88

99
; This test case tests spilling the CR GT bit on Power10. On Power10, this is

llvm/test/CodeGen/PowerPC/pcrel-jump-table.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
2-
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s \
2+
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-min-jump-table-entries=4 < %s | FileCheck %s \
33
; RUN: --check-prefix=CHECK-R
44
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
5-
; RUN: -mcpu=pwr10 -ppc-use-absolute-jumptables \
5+
; RUN: -mcpu=pwr10 -ppc-use-absolute-jumptables -ppc-min-jump-table-entries=4 \
66
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
77
; RUN: --check-prefix=CHECK-A-LE
88
; RUN: llc -verify-machineinstrs -target-abi=elfv2 -mtriple=powerpc64-- \
9-
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s \
9+
; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-min-jump-table-entries=4 < %s | FileCheck %s \
1010
; RUN: --check-prefix=CHECK-R
1111
; RUN: llc -verify-machineinstrs -target-abi=elfv2 -mtriple=powerpc64-- \
12-
; RUN: -mcpu=pwr10 -ppc-use-absolute-jumptables \
12+
; RUN: -mcpu=pwr10 -ppc-use-absolute-jumptables -ppc-min-jump-table-entries=4 \
1313
; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s \
1414
; RUN: --check-prefix=CHECK-A-BE
1515

llvm/test/CodeGen/PowerPC/ppc-TOC-stats.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
; REQUIRES: asserts
55

66
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \
7-
; RUN: --stats < %s 2>&1 | FileCheck %s --check-prefix=AIX
7+
; RUN: --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=AIX
88
; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \
9-
; RUN: --stats < %s 2>&1 | FileCheck %s --check-prefix=AIX
9+
; RUN: --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=AIX
1010
; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \
11-
; RUN: --stats < %s 2>&1 | FileCheck %s --check-prefix=LINUX
11+
; RUN: --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=LINUX
1212
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \
13-
; RUN: --stats < %s 2>&1 | FileCheck %s --check-prefix=LINUX
13+
; RUN: --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=LINUX
1414
; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \
15-
; RUN: -code-model=large --stats < %s 2>&1 | FileCheck %s --check-prefix=LINUXLARGE
15+
; RUN: -code-model=large --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=LINUXLARGE
1616
; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \
17-
; RUN: -code-model=large --stats < %s 2>&1 | FileCheck %s --check-prefix=LINUXLARGE
17+
; RUN: -code-model=large --stats -ppc-min-jump-table-entries=4 < %s 2>&1 | FileCheck %s --check-prefix=LINUXLARGE
1818

1919

2020
; The purpose of this test is to check that the statistics about the TOC are

llvm/test/CodeGen/PowerPC/pr22711.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Verify that the .toc section is aligned on an 8-byte boundary.
22

3-
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -filetype=obj -o - | llvm-readobj --sections - | FileCheck %s
3+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
4+
; RUN: -mcpu=pwr8 -filetype=obj -ppc-min-jump-table-entries=4 -o - | llvm-readobj --sections - | FileCheck %s
45

56
define void @test(ptr %a) {
67
entry:

llvm/test/CodeGen/PowerPC/pr33547.ll

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,41 @@ L.entry:
4646
define void @testFunc(ptr nocapture %r, ptr nocapture readonly %k) {
4747
; CHECK-LABEL: testFunc:
4848
; CHECK: # %bb.0: # %L.entry
49-
; CHECK-NEXT: mflr 0
50-
; CHECK-NEXT: stdu 1, -32(1)
51-
; CHECK-NEXT: std 0, 48(1)
52-
; CHECK-NEXT: .cfi_def_cfa_offset 32
53-
; CHECK-NEXT: .cfi_offset lr, 16
54-
; CHECK-NEXT: bl .L2$pb
55-
; CHECK-NEXT: .L2$pb:
56-
; CHECK-NEXT: lwz 4, 0(4)
57-
; CHECK-NEXT: mflr 5
58-
; CHECK-NEXT: addi 4, 4, -1
59-
; CHECK-NEXT: cmplwi 4, 5
60-
; CHECK-NEXT: bgt 0, .LBB2_6
61-
; CHECK-NEXT: # %bb.1: # %L.entry
62-
; CHECK-NEXT: addis 6, 2, .LC2@toc@ha
63-
; CHECK-NEXT: rldic 4, 4, 2, 30
64-
; CHECK-NEXT: ld 6, .LC2@toc@l(6)
65-
; CHECK-NEXT: lwax 4, 4, 6
66-
; CHECK-NEXT: add 4, 4, 5
67-
; CHECK-NEXT: mtctr 4
49+
; CHECK-NEXT: lwz 5, 0(4)
6850
; CHECK-NEXT: li 4, -3
69-
; CHECK-NEXT: bctr
51+
; CHECK-NEXT: cmpwi 5, 4
52+
; CHECK-NEXT: bge 0, .LBB2_6
53+
; CHECK-NEXT: # %bb.1: # %L.entry
54+
; CHECK-NEXT: cmplwi 5, 1
55+
; CHECK-NEXT: beq 0, .LBB2_11
56+
; CHECK-NEXT: # %bb.2: # %L.entry
57+
; CHECK-NEXT: cmplwi 5, 2
58+
; CHECK-NEXT: beq 0, .LBB2_5
59+
; CHECK-NEXT: # %bb.3: # %L.entry
60+
; CHECK-NEXT: cmplwi 5, 3
61+
; CHECK-NEXT: beq 0, .LBB2_11
62+
; CHECK-NEXT: # %bb.4: # %L.LB3_307
63+
; CHECK-NEXT: blr
7064
; CHECK-NEXT: .p2align 4
71-
; CHECK-NEXT: .LBB2_2: # %infloop11
65+
; CHECK-NEXT: .LBB2_5: # %infloop11
7266
; CHECK-NEXT: #
73-
; CHECK-NEXT: b .LBB2_2
67+
; CHECK-NEXT: b .LBB2_5
68+
; CHECK-NEXT: .LBB2_6: # %L.entry
69+
; CHECK-NEXT: beq 0, .LBB2_10
70+
; CHECK-NEXT: # %bb.7: # %L.entry
71+
; CHECK-NEXT: cmplwi 5, 5
72+
; CHECK-NEXT: beq 0, .LBB2_11
73+
; CHECK-NEXT: # %bb.8: # %L.entry
74+
; CHECK-NEXT: cmplwi 5, 6
75+
; CHECK-NEXT: bnelr 0
7476
; CHECK-NEXT: .p2align 4
75-
; CHECK-NEXT: .LBB2_3: # %infloop
77+
; CHECK-NEXT: .LBB2_9: # %infloop
7678
; CHECK-NEXT: #
77-
; CHECK-NEXT: b .LBB2_3
78-
; CHECK-NEXT: .LBB2_4: # %L.LB3_321.split
79+
; CHECK-NEXT: b .LBB2_9
80+
; CHECK-NEXT: .LBB2_10: # %L.LB3_321.split
7981
; CHECK-NEXT: li 4, 5
80-
; CHECK-NEXT: .LBB2_5: # %L.LB3_307.sink.split
82+
; CHECK-NEXT: .LBB2_11: # %L.LB3_307.sink.split
8183
; CHECK-NEXT: stw 4, 0(3)
82-
; CHECK-NEXT: .LBB2_6: # %L.LB3_307
83-
; CHECK-NEXT: addi 1, 1, 32
84-
; CHECK-NEXT: ld 0, 16(1)
85-
; CHECK-NEXT: mtlr 0
8684
; CHECK-NEXT: blr
8785
L.entry:
8886
%0 = load i32, ptr %k, align 4

llvm/test/CodeGen/PowerPC/unreachable-mbb-jtreference-elimination.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -O2 --verify-machineinstrs -stop-before=livevars \
1+
; RUN: llc -O2 --verify-machineinstrs -stop-before=livevars -ppc-min-jump-table-entries=4 \
22
; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
33

44
define dso_local void @foo() #0 {

0 commit comments

Comments
 (0)