Use swap8, swap16 and pkbt32 to swap bytes for XLenVT and
customized lower BITREVERSE to bitrevi.
Details
- Reviewers
craig.topper jrtc27 frasercrmck
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/RISCV/rvp/bswap.ll | ||
---|---|---|
21–24 ↗ | (On Diff #349828) | 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. |
llvm/lib/Target/RISCV/RISCVInstrInfoP.td | ||
---|---|---|
1292 | What if Zbb is enabled. Who gets priority? | |
llvm/test/CodeGen/RISCV/rvp/bswap.ll | ||
21–24 ↗ | (On Diff #349828) | You probably want to catch i8/i16 on RV32/RV64 and i32 on RV64 in ReplaceNodeResults and map them to the minimum swap instruction you need before they get promoted. |
Merge https://reviews.llvm.org/D103691 into this patch.
Add the codegen of RVB for testcases.
catch i8/i16 on RV32/RV64 and i32 on RV64