1 # RUN: not --crash llc -march=x86-64 -run-pass=none -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s -implicit-check-not="Bad machine code"
2 # REQUIRES: x86-registered-target
4 # These copies have mismatched type sizes that are allowed because the
5 # register class is defined to directly include the narrower type.
7 name: test_valid_copies
8 tracksRegLiveness: true
11 liveins: $xmm0, $xmm1, $xmm2, $xmm3, $xmm4
12 %0:_(s32) = COPY $xmm0
13 %1:_(s64) = COPY $xmm1
14 %2:_(s128) = COPY $xmm2
15 %3:_(<4 x s32>) = COPY $xmm3
16 %4:_(<2 x s64>) = COPY $xmm4
25 name: test_invalid_copies
26 tracksRegLiveness: true
29 liveins: $xmm0, $xmm1, $xmm2, $xmm3
31 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
32 ; CHECK: - instruction: %0:_(s16) = COPY $xmm0
33 %0:_(s16) = COPY $xmm0
35 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
36 ; CHECK: - instruction: %1:_(<4 x s16>) = COPY $xmm1
37 %1:_(<4 x s16>) = COPY $xmm1
39 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
40 ; CHECK: - instruction: %2:_(s256) = COPY $xmm2
41 %2:_(s256) = COPY $xmm2
43 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
44 ; CHECK: - instruction: %3:_(<8 x s32>) = COPY $xmm3
45 %3:_(<8 x s32>) = COPY $xmm3
47 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
48 ; CHECK: - instruction: $xmm0 = COPY %0:_(s16)
51 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
52 ; CHECK: - instruction: $xmm1 = COPY %1:_(<4 x s16>)
55 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
56 ; CHECK: - instruction: $xmm2 = COPY %2:_(s256)
59 ; CHECK: *** Bad machine code: Copy Instruction is illegal with mismatching sizes ***
60 ; CHECK: - instruction: $xmm3 = COPY %3:_(<8 x s32>)