Skip to content

Commit def4253

Browse files
committed
[NFC][CodeGen][AArch64] Add tests for unconditional branch duplication
c9f3288 introduced unconditional branch deduplication for basic block sections and machine function splitting, but it didn't add tests for AArch64 since prior behavior crashed the test. This change adds tests for AArch64 and has no functional change.
1 parent 08c5f1f commit def4253

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/test/CodeGen/Generic/machine-function-splitter.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -aarch64-min-jump-table-entries=4 -enable-split-machine-functions -mfs-psi-cutoff=0 -mfs-count-threshold=2000 | FileCheck %s --dump-input=always -check-prefixes=MFS-OPTS1,MFS-OPTS1-AARCH64
1313
; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -aarch64-min-jump-table-entries=4 -enable-split-machine-functions -mfs-psi-cutoff=950000 | FileCheck %s -check-prefixes=MFS-OPTS2,MFS-OPTS2-AARCH64
1414
; RUN: llc < %s -mtriple=aarch64-unknown-linux-gnu -aarch64-min-jump-table-entries=4 -enable-split-machine-functions -mfs-split-ehcode | FileCheck %s -check-prefixes=MFS-EH-SPLIT,MFS-EH-SPLIT-AARCH64
15+
; RUN: llc < %s -mtriple=aarch64 -split-machine-functions -O0 -mfs-psi-cutoff=0 -mfs-count-threshold=10000 | FileCheck %s -check-prefixes=MFS-O0,MFS-O0-AARCH64
1516
; RUN: llc < %s -mtriple=aarch64 -enable-split-machine-functions -aarch64-redzone | FileCheck %s -check-prefixes=MFS-REDZONE-AARCH64
1617

1718
; COM: Machine function splitting with AFDO profiles
@@ -470,9 +471,8 @@ define void @foo16(i1 zeroext %0) nounwind !prof !14 !section_prefix !15 {
470471
; MFS-O0-LABEL: foo16
471472
; MFS-O0-X86: jmp
472473
; MFS-O0-X86-NOT: jmp
473-
; MFS-O0-AARCH64: br
474-
; MFS-O0-AARCH64: br
475-
; MFS-O0-AARCH64-NOT: br
474+
; MFS-O0-AARCH64: b foo16.cold
475+
; MFS-O0-AARCH64-NOT: b foo16.cold
476476
; MFS-O0: .section .text.split.foo16
477477
; MFS-O0-NEXT: foo16.cold
478478
%2 = call i32 @baz()

0 commit comments

Comments
 (0)