blob: b7d775f7a1b35cbb98850c77b4f522ec785265f0 [file]
# RUN: not --crash llc -o - -mtriple=amdgcn-amd-amdhsa -run-pass=none %s 2>&1 | FileCheck %s
---
name: test_copy_lanemask_instruction_0
tracksRegLiveness: true
body: |
bb.0:
liveins: $vgpr0, $vgpr1
%0:vgpr_32 = IMPLICIT_DEF
; CHECK: *** Bad machine code: COPY_LANEMASK must read at least one lane ***
$vgpr2 = COPY_LANEMASK $vgpr0, lanemask(0)
; CHECK: *** Bad machine code: COPY_LANEMASK attempts to read from the lanes that don't exist in the source register ***
$vgpr3 = COPY_LANEMASK $vgpr1, lanemask(0xFFFFFFFFFFFFFFFF)
; CHECK: *** Bad machine code: COPY_LANEMASK cannot be used to do full copy ***
$vgpr4_vgpr5 = COPY_LANEMASK $vgpr2_vgpr3, lanemask(0x000000000000000F)
; CHECK: *** Bad machine code: COPY_LANEMASK cannot be used to do full copy ***
%1:vgpr_32 = COPY_LANEMASK %0, lanemask(0x0000000000000003)
; CHECK: *** Bad machine code: COPY_LANEMASK attempts to read from the lanes that don't exist in the source register ***
%2:vgpr_32 = COPY_LANEMASK %1, lanemask(0x0000000FFFFFFFFF)
; CHECK: *** Bad machine code: COPY_LANEMASK attempts to read from the lanes that don't exist in the source register ***
%3:vreg_64 = COPY_LANEMASK $vgpr4_vgpr5, lanemask(0x00000000000000FF)
; CHECK: *** Bad machine code: COPY_LANEMASK cannot be used to do full copy ***
$vgpr6_vgpr7 = COPY_LANEMASK %3, lanemask(0x000000000000000F)
; CHECK: *** Bad machine code: COPY_LANEMASK must not use a subregister index ***
%4:vgpr_32 = COPY_LANEMASK %3.sub0, lanemask(0x0000000000000003)
S_ENDPGM 0
...