[llvm] [CodeGen][MIR] Support parsing of scalable vectors in MIR (PR #70893)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 23:44:51 PDT 2023


================
@@ -0,0 +1,23 @@
+# RUN: llc -run-pass=none -o - %s | FileCheck %s
+
+---
+name:            scalable_vector_type_s
+body: |
+  bb.0:
+    ; CHECK-LABEL: name: scalable_vector_type_s
+    ; CHECK: [[DEF:%[0-9]+]]:_(<vscale x 1 x s8>) = IMPLICIT_DEF
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<vscale x 1 x s8>) = COPY [[DEF]](<vscale x 1 x s8>)
+    %0:_(<vscale x 1 x s8>) = IMPLICIT_DEF
+    %1:_(<vscale x 1 x s8>) = COPY %0
+...
+
+---
+name:            scalable_vector_type_p
+body: |
+  bb.0:
+    ; CHECK-LABEL: name: scalable_vector_type_p
+    ; CHECK: [[DEF:%[0-9]+]]:_(<vscale x 1 x p0>) = IMPLICIT_DEF
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<vscale x 1 x p0>) = COPY [[DEF]](<vscale x 1 x p0>)
+    %0:_(<vscale x 1 x p0>) = IMPLICIT_DEF
+    %1:_(<vscale x 1 x p0>) = COPY %0
+...
----------------
arsenm wrote:

should also have some tests with different numbers of elements and pointer addrspaces 

https://github.com/llvm/llvm-project/pull/70893


More information about the llvm-commits mailing list