[all-commits] [llvm/llvm-project] 88f33c: [RISCV] Add bitreverse tests to bswap-ctlz-cttz-ct...
Craig Topper via All-commits
all-commits at lists.llvm.org
Sun Jan 23 13:46:35 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 88f33cff4bee87ea31e129f734df232274098a78
https://github.com/llvm/llvm-project/commit/88f33cff4bee87ea31e129f734df232274098a78
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-01-23 (Sun, 23 Jan 2022)
Changed paths:
A llvm/test/CodeGen/RISCV/bswap-bitreverse-ctlz-cttz-ctpop.ll
R llvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll
Log Message:
-----------
[RISCV] Add bitreverse tests to bswap-ctlz-cttz-ctpop.ll. Add Zbb command lines. NFC
Rename to include bitreverse. Add additional tests and Zbb command lines.
There's some overlapping tests with rv32zbb.ll and rv64zbb.ll. Maybe
I'll clean that up in a future patch.
Commit: 3575700b286f8c3150abb3de7968a9f36dd1cceb
https://github.com/llvm/llvm-project/commit/3575700b286f8c3150abb3de7968a9f36dd1cceb
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-01-23 (Sun, 23 Jan 2022)
Changed paths:
M llvm/test/CodeGen/RISCV/bswap-bitreverse-ctlz-cttz-ctpop.ll
Log Message:
-----------
[RISCV] Add tests that do a bitreverse before or after a bswap. NFC
We don't optimize this as well as we could. Bitreverse is always
expanded to bswap and a shift/and/or sequence to swap bits within a
byte. The newly created bswap will either becomes a shift/and/or
sequence or rev8 instruction. We don't always realize the bswap is
redundant with another bswap before or after the bitreverse.
Found while thinking about the brev8 instruction from the
Cryptography extension. It's equivalent to bswap(bitreverse(x)) or
bitreverse(bswap(x)).
Compare: https://github.com/llvm/llvm-project/compare/4762c077e710...3575700b286f
More information about the All-commits
mailing list