mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
cc12b285b6
This will currently accept the old number of bytes syntax, and convert it to a scalar. This should be removed in the near future (I think I converted all of the tests already, but likely missed a few). Not sure what the exact syntax and policy should be. We can continue printing the number of bytes for non-generic instructions to avoid test churn and only allow non-scalar types for generic instructions. This will currently print the LLT in parentheses, but accept parsing the existing integers and implicitly converting to scalar. The parentheses are a bit ugly, but the parser logic seems unable to deal without either parentheses or some keyword to indicate the start of a type.
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
# RUN: llc -march=amdgcn -run-pass si-fix-sgpr-copies %s -o - | FileCheck %s -check-prefixes=GCN
|
|
|
|
---
|
|
|
|
name: phi_visit_order
|
|
tracksRegLiveness: true
|
|
registers:
|
|
- { id: 0, class: sreg_32_xm0 }
|
|
- { id: 1, class: sreg_64 }
|
|
- { id: 2, class: sreg_32_xm0 }
|
|
- { id: 7, class: vgpr_32 }
|
|
- { id: 8, class: sreg_32_xm0 }
|
|
- { id: 9, class: vgpr_32 }
|
|
- { id: 10, class: sreg_64 }
|
|
- { id: 11, class: sreg_32_xm0 }
|
|
|
|
body: |
|
|
; GCN-LABEL: name: phi_visit_order
|
|
; GCN: S_ADD_I32
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
%7 = COPY $vgpr0
|
|
%8 = S_MOV_B32 0
|
|
|
|
bb.1:
|
|
%0 = PHI %8, %bb.0, %0, %bb.1, %2, %bb.2
|
|
%9 = V_MOV_B32_e32 9, implicit $exec
|
|
%10 = V_CMP_EQ_U32_e64 %7, %9, implicit $exec
|
|
%1 = SI_IF %10, %bb.2, implicit-def $exec, implicit-def $scc, implicit $exec
|
|
S_BRANCH %bb.1
|
|
|
|
bb.2:
|
|
SI_END_CF %1, implicit-def $exec, implicit-def $scc, implicit $exec
|
|
%11 = S_MOV_B32 1
|
|
%2 = S_ADD_I32 %0, %11, implicit-def $scc
|
|
S_BRANCH %bb.1
|
|
|
|
...
|
|
|
|
---
|
|
|
|
# GCN-LABEL: name: dead_illegal_virtreg_copy
|
|
# GCN: %0:vgpr_32 = COPY $vgpr0
|
|
# GCN: %1:sreg_32_xm0 = IMPLICIT_DEF
|
|
# GCN: S_ENDPGM 0, implicit %0
|
|
|
|
name: dead_illegal_virtreg_copy
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
%0:vgpr_32 = COPY $vgpr0
|
|
%1:sreg_32_xm0 = COPY %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|
|
|
|
---
|
|
|
|
# GCN-LABEL: name: dead_illegal_physreg_copy
|
|
# GCN: %2:vgpr_32 = COPY $vgpr0
|
|
# GCN: %1:sreg_32_xm0 = IMPLICIT_DEF
|
|
# GCN: S_ENDPGM 0, implicit %2
|
|
|
|
name: dead_illegal_physreg_copy
|
|
tracksRegLiveness: true
|
|
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
%0:sreg_32_xm0 = COPY $vgpr0
|
|
%1:sreg_32_xm0 = COPY %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|
|
|
|
# Make sure there's no assert when looking at the implicit use on S_ENDPGM
|
|
# GCN-LABEL: name: s_to_v_copy_implicit_use
|
|
# GCN: %0:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM undef %1:sreg_64, 0, 0 :: (load (s32), addrspace 4)
|
|
# GCN-NEXT: %2:vgpr_32 = COPY %0
|
|
# GCN-NEXT: S_ENDPGM 0, implicit %2
|
|
---
|
|
name: s_to_v_copy_implicit_use
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
%0:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM undef %2:sreg_64, 0, 0 :: (load (s32), addrspace 4)
|
|
%1:vgpr_32 = COPY %0
|
|
S_ENDPGM 0, implicit %1
|
|
|
|
...
|