xref: /llvm-project/llvm/test/MachineVerifier/test_g_splat_vector.mir (revision d5c292d8ef590f64d26c16d12afebb6ad7f50373)
1# RUN: not --crash llc -o - -mtriple=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
2# REQUIRES: aarch64-registered-target
3---
4name:            g_splat_vector
5tracksRegLiveness: true
6liveins:
7body:             |
8  bb.0:
9    %0:_(s32) = G_CONSTANT i32 0
10    %1:_(<2 x s32>) = G_IMPLICIT_DEF
11    %2:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
12
13    ; CHECK: Destination type must be a scalable vector
14    %3:_(s32) = G_SPLAT_VECTOR %0
15
16    ; CHECK: Destination type must be a scalable vector
17    %4:_(<2 x s32>) = G_SPLAT_VECTOR %0
18
19    ; CHECK: Source type must be a scalar or pointer
20    %5:_(<vscale x 2 x s32>) = G_SPLAT_VECTOR %1
21
22    ; CHECK: Source type must be a scalar or pointer
23    %6:_(<vscale x 2 x s32>) = G_SPLAT_VECTOR %2
24
25    ; CHECK: Element type of the destination must be the same size or smaller than the source type
26    %7:_(<vscale x 2 x s128>) = G_SPLAT_VECTOR %0
27...
28