Files
clang-p2996/llvm/test/CodeGen/AArch64/sms-unacceptable-loop3.mir
Yuta Mukai 0c5319e546 [ModuloSchedule][AArch64] Implement modulo variable expansion for pipelining (#65609)
Modulo variable expansion is a technique that resolves overlap of
variable lifetimes by unrolling. The existing implementation solves it
by making a copy by move instruction for processors with ordinary
registers such as Arm and x86. This method may result in a very large
number of move instructions, which can cause performance problems.

Modulo variable expansion is enabled by specifying -pipeliner-mve-cg. A
backend must implement some newly defined interfaces in
PipelinerLoopInfo. They were implemented for AArch64.

Discourse thread:
https://discourse.llvm.org/t/implementing-modulo-variable-expansion-for-machinepipeliner
2024-06-12 10:27:35 +09:00

110 lines
2.5 KiB
YAML

# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -run-pass pipeliner -aarch64-enable-pipeliner -debug-only=pipeliner 2>&1 | FileCheck %s
# REQUIRES: asserts
# unacceptable loops by pipeliner
...
---
name: func1
tracksRegLiveness: true
body: |
; multiple counter increment instructions
; CHECK: Unable to analyzeLoop, can NOT pipeline Loop
bb.0.entry:
liveins: $x0, $x1
%10:gpr64 = COPY $x0
%11:gpr64 = COPY $x1
bb.1:
%12:gpr64 = PHI %11, %bb.0, %13, %bb.1
%13:gpr64 = ADDXrr %12, %11
%14:gpr64 = ADDXrr %13, %11
dead $xzr = SUBSXrr %10, %14, implicit-def $nzcv
Bcc 1, %bb.1, implicit $nzcv
B %bb.2
bb.2:
...
---
name: func2
tracksRegLiveness: true
body: |
; neither operand of the increment instruction is a loop invariant value
; CHECK: Unable to analyzeLoop, can NOT pipeline Loop
bb.0.entry:
liveins: $x0, $x1
%10:gpr64 = COPY $x0
%11:gpr64 = COPY $x1
bb.1:
%12:gpr64 = PHI %11, %bb.0, %13, %bb.1
%13:gpr64 = ADDXrr %12, %12
dead $xzr = SUBSXrr %10, %13, implicit-def $nzcv
Bcc 1, %bb.1, implicit $nzcv
B %bb.2
bb.2:
...
---
name: func3
tracksRegLiveness: true
body: |
; neither operand of the compare instruction is a loop invariant value
; CHECK: Unable to analyzeLoop, can NOT pipeline Loop
bb.0.entry:
liveins: $x0, $x1
%10:gpr64 = COPY $x0
%11:gpr64 = COPY $x1
bb.1:
%12:gpr64 = PHI %11, %bb.0, %13, %bb.1
%13:gpr64 = ADDXrr %12, %11
dead $xzr = SUBSXrr %13, %13, implicit-def $nzcv
Bcc 1, %bb.1, implicit $nzcv
B %bb.2
bb.2:
...
---
name: func4
tracksRegLiveness: true
body: |
; multiple phi instructions
; CHECK: Unable to analyzeLoop, can NOT pipeline Loop
bb.0.entry:
liveins: $x0, $x1
%10:gpr64 = COPY $x0
%11:gpr64 = COPY $x1
bb.1:
%12:gpr64 = PHI %11, %bb.0, %13, %bb.1
%14:gpr64 = PHI %11, %bb.0, %15, %bb.1
dead $xzr = SUBSXrr %12, %10, implicit-def $nzcv
%13:gpr64 = ADDXrr %14, %11
%15:gpr64 = ADDXrr %12, %11
Bcc 1, %bb.1, implicit $nzcv
B %bb.2
bb.2:
...
---
name: func5
tracksRegLiveness: true
body: |
; not an increment instruction
; CHECK: Unable to analyzeLoop, can NOT pipeline Loop
bb.0.entry:
liveins: $x0, $x1
%10:gpr64 = COPY $x0
%11:gpr64 = COPY $x1
bb.1:
%12:gpr64 = PHI %11, %bb.0, %13, %bb.1
%13:gpr64 = ORRXrr %12, %12
dead $xzr = SUBSXrr %12, %10, implicit-def $nzcv
Bcc 1, %bb.1, implicit $nzcv
B %bb.2
bb.2:
...