llvm-project/llvm/test/CodeGen/X86/fastregalloc-selfloop.mir
paperchalice 1bc8b3258e
[NewPM][CodeGen] Port regallocfast to new pass manager (#94426)
This pull request port `regallocfast` to new pass manager. It exposes
the parameter `filter` to handle different register classes for AMDGPU.
IIUC AMDGPU need to allocate different register classes separately so it
need implement its own `--<reg-class>-regalloc`. Now users can use e.g.
`-passe=regallocfast<filter=sgpr>` to allocate specific register class.
The command line option `--regalloc-npm` is still in work progress, plan
to reuse the syntax of passes, e.g. use
`--regalloc-npm=regallocfast<filter=sgpr>,greedy<filter=vgpr>` to
replace `--sgpr-regalloc` and `--vgpr-regalloc`.
2024-06-07 12:22:42 +08:00

33 lines
933 B
YAML

# RUN: llc -mtriple=x86_64-- -run-pass=regallocfast -o - %s | FileCheck %s
# RUN: llc -mtriple=x86_64-- -passes=regallocfast -o - %s | FileCheck %s
...
---
name: foo
alignment: 16
tracksRegLiveness: true
registers:
- { id: 0, class: vr128 }
frameInfo:
maxAlignment: 16
stack:
- { id: 0, size: 64, alignment: 16 }
machineFunctionInfo: {}
body: |
bb.0.entry:
; CHECK: renamable $xmm1 = V_SET0
; CHECK-NEXT: renamable $xmm0 = V_SET0
; CHECK-NEXT: renamable $xmm1 = PXORrr renamable $xmm1, renamable $xmm0
; CHECK-NEXT: MOVAPSmr %stack.0, 1, $noreg, 0, $noreg, killed renamable $xmm1
; CHECK-NEXT: MOVAPSmr %stack.0, 1, $noreg, 16, $noreg, killed renamable $xmm0
%0:vr128 = V_SET0
%1:vr128 = V_SET0
%0:vr128 = PXORrr %0, %1
MOVAPSmr %stack.0, 1, $noreg, 0, $noreg, %0
MOVAPSmr %stack.0, 1, $noreg, 16, $noreg, %1
JMP_1 %bb.0.entry
RET 0
...