[PATCH] D103689: [RISCV] Add support for BSWAP for RVP

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 05:18:46 PDT 2021


jrtc27 added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rvp/bswap.ll:21-24
+; RV64-NEXT:    swap8 a0, a0
+; RV64-NEXT:    swap16 a0, a0
+; RV64-NEXT:    pkbt32 a0, a0, a0
+; RV64-NEXT:    srli a0, a0, 48
----------------
This is not a code size win. This has also introduced more instruction dependencies; previously 1 and 2 were independent, as were 1 and 3, but now every instruction is dependent on the previous, forming a slow chain that will hurt out-of-order cores, or simple in-order cores that can't execute back-to-back P instructions with forwarding.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103689/new/

https://reviews.llvm.org/D103689



More information about the llvm-commits mailing list