blob: 2a85a362ddb141fa87a259c206c9d5717a0fe64f [file] [edit]
# RUN: llc -mtriple=amdgpu9.00-amd-amdhsa -passes=regallocfast -o - %s | FileCheck %s
# Checks are anchored with {{^}}, since an unanchored check also matches a line
# with a spurious "dead".
# The sub-register def is covered by the live implicit-def of the whole tuple,
# so it must not be marked dead.
---
name: subreg_def_covered_by_tuple_def
tracksRegLiveness: true
body: |
bb.0:
; CHECK-LABEL: name: subreg_def_covered_by_tuple_def
; CHECK: {{^}} $sgpr4 = S_MOV_B32 0, implicit-def $sgpr4_sgpr5_sgpr6_sgpr7{{$}}
$sgpr4 = S_MOV_B32 0, implicit-def $sgpr4_sgpr5_sgpr6_sgpr7
S_ENDPGM 0
...
# Live defs of the sub-registers do not keep the dead tuple def alive, even
# though together they cover all of its register units.
---
name: tuple_def_covered_by_subreg_defs
tracksRegLiveness: true
body: |
bb.0:
; CHECK-LABEL: name: tuple_def_covered_by_subreg_defs
; CHECK: {{^}} dead $sgpr4_sgpr5 = S_MOV_B64 0, implicit-def $sgpr4, implicit-def $sgpr5{{$}}
$sgpr4_sgpr5 = S_MOV_B64 0, implicit-def $sgpr4, implicit-def $sgpr5
S_ENDPGM 0
...