Customized lower BITREVERSE to bitrevi.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2025 | This will cause you to not assert for BSWAP when only RVP is enabled | |
2031–2034 | Is BITREVI or bitmanip's REV better? Why do two extensions need to define the same instruction differently; can there not be a common sub-extension implemented by both (e.g. just the REV form of GREV), like how scalar crypto is using parts of bitmanip? |
I do not think RVP needs its own subdirectory for CodeGen tests. RVV has one because the extension is massive, but RVP is comparatively small. It should be like all the others. Especially since I think we should be testing interesting combinations of extensions for various tests (e.g. bitmanip + P for things like this).
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2031–2034 | It looks BITREVI reverses a range of bits while GREVI reverses nibbles, bytes, words, dwords, etc.? I think you can also handle i32 bitreverse on RV64 by limiting the BITREVI range to the lower 32 bits? I would like to see that handled in this patch since we handle i32 with GREVIW. We should probably do i8/i16 for this too, but we don't do it for GREVI so I'm less concerned about matching it. |
I am ongoing to move RVP tests out of its own subdirectory and add tests for the combination of bitmanip + P.
This will cause you to not assert for BSWAP when only RVP is enabled