aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/MachineVerifier
diff options
context:
space:
mode:
authorMichael Maitland <michaeltmaitland@gmail.com>2024-03-07 09:50:29 -0500
committerMichael Maitland <michaeltmaitland@gmail.com>2024-03-07 09:10:03 -0800
commit96049fcf4e5f2eb0271bdfa89e113eef9c5fa9f6 (patch)
tree0019935a8fed1540ebcb93af14ca8da45252c0fa /llvm/test/MachineVerifier
parent8f79cdd8da97c131ae7d8a3210bb69cb6654903d (diff)
downloadllvm-96049fcf4e5f2eb0271bdfa89e113eef9c5fa9f6.zip
llvm-96049fcf4e5f2eb0271bdfa89e113eef9c5fa9f6.tar.gz
llvm-96049fcf4e5f2eb0271bdfa89e113eef9c5fa9f6.tar.bz2
[GISEL] Add IRTranslation for shufflevector on scalable vector types (#80378)
Recommits llvm/llvm-project#80378 which was reverted in llvm/llvm-project#84330. The problem was that the change in llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir used 217 as an opcode instead of a regex.
Diffstat (limited to 'llvm/test/MachineVerifier')
-rw-r--r--llvm/test/MachineVerifier/test_g_splat_vector.mir27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/MachineVerifier/test_g_splat_vector.mir b/llvm/test/MachineVerifier/test_g_splat_vector.mir
new file mode 100644
index 0000000..0d1d8a3
--- /dev/null
+++ b/llvm/test/MachineVerifier/test_g_splat_vector.mir
@@ -0,0 +1,27 @@
+# RUN: not --crash llc -o - -mtriple=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
+# REQUIRES: aarch64-registered-target
+---
+name: g_splat_vector
+tracksRegLiveness: true
+liveins:
+body: |
+ bb.0:
+ %0:_(s32) = G_CONSTANT i32 0
+ %1:_(<2 x s32>) = G_IMPLICIT_DEF
+ %2:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF
+
+ ; CHECK: Destination type must be a scalable vector
+ %3:_(s32) = G_SPLAT_VECTOR %0
+
+ ; CHECK: Destination type must be a scalable vector
+ %4:_(<2 x s32>) = G_SPLAT_VECTOR %0
+
+ ; CHECK: Source type must be a scalar
+ %5:_(<vscale x 2 x s32>) = G_SPLAT_VECTOR %1
+
+ ; CHECK: Source type must be a scalar
+ %6:_(<vscale x 2 x s32>) = G_SPLAT_VECTOR %2
+
+ ; CHECK: Element type of the destination must be the same type as the source type
+ %7:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR %0
+...