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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 15:07:41 PDT 2023


================
@@ -82,7 +82,7 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
   }
 
   getActionDefinitionsBuilder(G_BSWAP)
-    .clampScalar(0, s16, XLenLLT)
+    .minScalar(0, s16)
----------------
topperc wrote:

I was suggesting `maxScalar(0, XLenLLT)`. G_BSWAP already requires at s16 so there's no need for minScalar with s16.

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


More information about the llvm-commits mailing list