1 # REQUIRES: amdgpu-registered-target
2 # RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=none -o /dev/null %s 2>&1 | FileCheck %s
5 name: invalid_reg_sequence
6 tracksRegLiveness: true
9 %0:vgpr_32 = IMPLICIT_DEF
10 %1:vgpr_32 = IMPLICIT_DEF
13 ; CHECK: *** Bad machine code: Too few operands ***
17 ; CHECK: *** Bad machine code: Too few operands ***
18 %2:vreg_64 = REG_SEQUENCE
21 ; CHECK: *** Bad machine code: Explicit definition marked as use ***
22 REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1
24 ; Missing subreg operand
25 ; CHECK: *** Bad machine code: Invalid number of operands for REG_SEQUENCE ***
26 %3:vreg_64 = REG_SEQUENCE %0, %subreg.sub0, %1
28 ; Missing register operand
29 ; CHECK: *** Bad machine code: Invalid number of operands for REG_SEQUENCE ***
30 %4:vreg_64 = REG_SEQUENCE %0, %subreg.sub0, %subreg.sub1
33 ; CHECK: *** Bad machine code: REG_SEQUENCE does not support physical register results ***
34 $vgpr0_vgpr1 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1
36 ; Subreg in destination
37 ; CHECK: *** Bad machine code: Invalid subreg result for REG_SEQUENCE ***
38 %5.sub0_sub1:vreg_128 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1
40 ; All operands are registers
41 ; CHECK: *** Bad machine code: Invalid subregister index operand for REG_SEQUENCE ***
42 %6:vreg_64 = REG_SEQUENCE %0, %1
44 ; Register and subreg index operand order swapped
45 ; CHECK: *** Bad machine code: Invalid register operand for REG_SEQUENCE ***
46 ; CHECK: *** Bad machine code: Invalid subregister index operand for REG_SEQUENCE ***
47 %7:vreg_64 = REG_SEQUENCE %subreg.sub0, %0, %subreg.sub1, %1
49 ; Invalid subreg index constants
50 ; CHECK: *** Bad machine code: Invalid subregister index operand for REG_SEQUENCE ***
51 ; CHECK: - instruction: %8:vreg_64 = REG_SEQUENCE %0:vgpr_32, %subreg.0, %1:vgpr_32, %subreg.99999
52 ; CHECK-NEXT: operand 2: 0
54 ; CHECK: *** Bad machine code: Invalid subregister index operand for REG_SEQUENCE ***
55 ; CHECK: instruction: %8:vreg_64 = REG_SEQUENCE %0:vgpr_32, %subreg.0, %1:vgpr_32, %subreg.99999
56 ; CHECK-NEXT: operand 4: 99999
57 %8:vreg_64 = REG_SEQUENCE %0, 0, %1, 99999