llvm-project/llvm/test/CodeGen/AMDGPU/alloc-all-regs-reserved-in-class.mir
Matt Arsenault 61f99a1c75
RegAlloc: Do not fatal error if there are no registers in the alloc order (#119640)
Try to use DiagnosticInfo if every register in the class is reserved
by forcing assignment to a reserved register. Also reduces the number
of redundant errors emitted, particularly with fast.

This is still broken in the case of undef uses. There are additional
complications in greedy and fast, so leave it for a separate fix.
2024-12-16 10:52:49 +09:00

17 lines
582 B
YAML

# RUN: not llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=greedy -verify-machineinstrs -filetype=null %s 2>&1 | FileCheck --implicit-check-not=error %s
# Check that there isn't an assert if we try to allocate a virtual register from
# a class where all registers are reserved. All AGPRs are reserved on subtargets
# that do not have them.
# CHECK: error: <unknown>:0:0: no registers from class available to allocate in function 'use_agpr'
---
name: use_agpr
tracksRegLiveness: true
body: |
bb.0:
%0:agpr_32 = IMPLICIT_DEF
S_ENDPGM 0, implicit %0
...