[llvm] [RISCV][GISEL] Add legalizer for G_BSWAP (PR #70226)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 05:21:16 PDT 2023


================
@@ -81,6 +81,11 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
         .clampScalar(BigTyIdx, XLenLLT, XLenLLT);
   }
 
+  getActionDefinitionsBuilder(G_BSWAP)
+    .widenScalarToNextPow2(0)
----------------
tschuett wrote:

No. You have currently no instructions, thus you must clamp and lower.

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


More information about the llvm-commits mailing list