[llvm] [RISCV][GISEL] Legalize G_BITCAST for scalable vectors (PR #85970)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 10:39:34 PDT 2024


================
@@ -0,0 +1,761 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=riscv32 -mattr=+v -run-pass=legalizer %s -o - | FileCheck %s
+# RUN: llc -mtriple=riscv64 -mattr=+v -run-pass=legalizer %s -o - | FileCheck %s
+
+# Extend from s1 element vectors
+---
+name:            bitcastnxv1i8_nxv1i1
+legalized:       false
+tracksRegLiveness: true
+body:             |
+  bb.0.entry:
+    ; CHECK-LABEL: name: bitcastnxv1i8_nxv1i1
+    ; CHECK: [[DEF:%[0-9]+]]:_(<vscale x 1 x s8>) = G_IMPLICIT_DEF
+    ; CHECK-NEXT: $v8 = COPY [[DEF]](<vscale x 1 x s8>)
+    ; CHECK-NEXT: PseudoRET implicit $v8
+    %1:_(<vscale x 1 x s1>) = G_IMPLICIT_DEF
+    %0:_(<vscale x 1 x s8>) = G_BITCAST %1(<vscale x 1 x s1>)
----------------
michaelmaitland wrote:

Agreed. I need to do a full rework of the test cases here.

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


More information about the llvm-commits mailing list