[llvm] [RISCV][GISEL] Legalize G_BITCAST for scalable vectors (PR #85970)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 06:00:05 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)));
----------------
arsenm wrote:
No. In the legality rules, there's no need to ensure you only claim valid bitcasts are legal.
Independently of that, I would expect you need to limit this to supported element sizes
https://github.com/llvm/llvm-project/pull/85970
More information about the llvm-commits
mailing list