mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
a4075b4fd6
When assigning the definitions of an instruction we were updating the available registers while walking the definitions. Some of those definitions may be from physical registers and thus, they are not available for other definitions to take, but by the time we see that we may have already assign these registers to another virtual register. Fix that by walking through all the definitions and mark as unavailable the physical register definitions, then do the virtual register assignments. PR41790 llvm-svn: 360278
20 lines
603 B
YAML
20 lines
603 B
YAML
# RUN: llc -o - -mtriple=x86_64-- -run-pass=regallocfast %s | FileCheck %s
|
|
# Fast regalloc used to not collect physical register definitions
|
|
# before walking and assigning the virtual definition.
|
|
# Therefore it was possible for a virtual definition to end up
|
|
# using the same register as a later (in terms of operand list) physical
|
|
# register.
|
|
# Check this does not happen.
|
|
#
|
|
# PR41790
|
|
---
|
|
name: instruction_with_1virtreg_1physreg_defs
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
; CHECK-NOT: $rax = KILL implicit-def dead $rax
|
|
%0:gr64 = KILL implicit-def dead $rax
|
|
KILL killed %0
|
|
RET 0
|
|
...
|