1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/AMDGPU/lo16-32bit-physreg-copy.mir
Stanislav Mekhanoshin 8bd53ed9fe [AMDGPU] fix copies between 32 and 16 bit
This a hack to fix illegal 32 to 16 bit copies.
The problem is when we make 16 bit subregs legal it creates
a huge amount of failures which can only be resolved at once
without a temporary hack like this.

The next step is to change operands, instruction definitions
and patterns until this hack is not needed.

Differential Revision: https://reviews.llvm.org/D79119
2020-05-04 08:54:22 -07:00

37 lines
862 B
YAML

# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass postrapseudos -amdgpu-fix-16-bit-physreg-copies -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
# GCN-LABEL: name: lo16_to_v32
# GCN: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
name: lo16_to_v32
tracksRegLiveness: true
body: |
bb.0:
$vgpr0 = IMPLICIT_DEF
$vgpr1_lo16 = COPY $vgpr0
S_ENDPGM 0
...
# GCN-LABEL: name: v32_to_lo16
# GCN: $vgpr1 = V_MOV_B32_e32 $vgpr0, implicit $exec
name: v32_to_lo16
tracksRegLiveness: true
body: |
bb.0:
$vgpr0 = IMPLICIT_DEF
$vgpr1 = COPY $vgpr0_lo16
S_ENDPGM 0
...
# GCN-LABEL: name: samereg
# GCN: $vgpr0 = IMPLICIT_DEF
# GCN-NEXT: BUNDLE
# GCN-NEXT: S_ENDPGM
name: samereg
tracksRegLiveness: true
body: |
bb.0:
$vgpr0 = IMPLICIT_DEF
$vgpr0 = COPY $vgpr0_lo16
S_ENDPGM 0
...