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

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 10:05:09 PDT 2024


================
@@ -155,6 +155,9 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
 
   getActionDefinitionsBuilder(G_BITREVERSE).maxScalar(0, sXLen).lower();
 
+  getActionDefinitionsBuilder(G_BITCAST).legalIf(
+      all(isScalableVector(0), isScalableVector(1)));
----------------
michaelmaitland wrote:

I've updated this to check to make sure the types are the same size. I've also restricted to claim that its only on legal types since it doesn't really make sense to assume some min/max sized elements here without assuming that the types are legal.

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


More information about the llvm-commits mailing list