1 # RUN: not llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
2 # REQUIRES: x86-registered-target
4 # CHECK: Bad machine code: Generic extend/truncate can not operate on pointers
5 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
6 # CHECK-NEXT: - basic block: %bb.1
7 # CHECK-NEXT: - instruction: %t_p:_(s32) = G_TRUNC %p:_(p0)
9 # CHECK: Bad machine code: operand types must be all-vector or all-scalar
10 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
11 # CHECK-NEXT: - basic block: %bb.2
12 # CHECK-NEXT: - instruction: %se_i32:_(<2 x s64>) = G_SEXT %i32:_(s32)
14 # CHECK: Bad machine code: operand types must preserve number of vector elements
15 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
16 # CHECK-NEXT: - basic block: %bb.3
17 # CHECK-NEXT: - instruction: %ze_v2i32:_(<4 x s64>) = G_ZEXT %v2i32:_(<2 x s32>)
19 # CHECK: Bad machine code: Generic extend has destination type no larger than source
20 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
21 # CHECK-NEXT: - basic block: %bb.4
22 # CHECK-NEXT: - instruction: %ae_i32:_(s32) = G_ANYEXT %i32:_(s32)
24 # CHECK: Bad machine code: Generic truncate has destination type no smaller than source ***
25 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
26 # CHECK-NEXT: - basic block: %bb.5
27 # CHECK-NEXT: - instruction: %ft_f32:_(s64) = G_FPTRUNC %f32:_(s32)
30 # CHECK: Bad machine code: Generic extend/truncate can not operate on pointers
31 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
32 # CHECK-NEXT: - basic block: %bb.6
33 # CHECK-NEXT: - instruction: %ze_v2i128:_(<4 x p0>) = G_ZEXT %v2i128:_(<2 x s128>)
35 # CHECK: Bad machine code: operand types must preserve number of vector elements
36 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
37 # CHECK-NEXT: - basic block: %bb.6
38 # CHECK-NEXT: - instruction: %ze_v2i128:_(<4 x p0>) = G_ZEXT %v2i128:_(<2 x s128>)
40 # CHECK: Bad machine code: Generic extend has destination type no larger than source
41 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
42 # CHECK-NEXT: - basic block: %bb.6
43 # CHECK-NEXT: - instruction: %ze_v2i128:_(<4 x p0>) = G_ZEXT %v2i128:_(<2 x s128>)
46 # CHECK: Bad machine code: Generic extend/truncate can not operate on pointers
47 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
48 # CHECK-NEXT: - basic block: %bb.6
49 # CHECK-NEXT: - instruction: %fe_v2f128:_(p0) = G_FPEXT %v2f128:_(<2 x s128>)
51 # CHECK: Bad machine code: operand types must be all-vector or all-scalar
52 # CHECK-NEXT: - function: bad_generic_extends_and_truncates
53 # CHECK-NEXT: - basic block: %bb.6
54 # CHECK-NEXT: - instruction: %fe_v2f128:_(p0) = G_FPEXT %v2f128:_(<2 x s128>)
57 name: bad_generic_extends_and_truncates
58 tracksRegLiveness: true
61 liveins: $rdi, $esi, $rdx, $xmm0, $ymm1, $ymm2
64 %i32:_(s32) = COPY $esi
65 %v2i32:_(<2 x s32>) = COPY $rdx
66 %f32:_(s32) = COPY $xmm0
67 %v2i128:_(<2 x s128>) = COPY $ymm1
68 %v2f128:_(<2 x s128>) = COPY $ymm2
71 %t_p:_(s32) = G_TRUNC %p
74 %se_i32:_(<2 x s64>) = G_SEXT %i32
77 %ze_v2i32:_(<4 x s64>) = G_ZEXT %v2i32
80 %ae_i32:_(s32) = G_ANYEXT %i32
83 %ft_f32:_(s64) = G_FPTRUNC %f32
86 %ze_v2i128:_(<4 x p0>) = G_ZEXT %v2i128
87 %fe_v2f128:_(p0) = G_FPEXT %v2f128