We had a few patches on the list that shared predicates (for extending
the reach of xori and ori -- and for the branches on two
polarity-reversed bits) and thus depended on each other.
These all had approval with requested changes, so these are now
collected together for v2.
Note that this adds the (a & ~C) case, so please take a look on that
part and OK the updated series.
Changes in v2:
- Collects already approved changes for v2 for (a | C) and (a ^ C).
- Pulls in the (already) approved branch on polarity-reversed bits
for v2, as it shares predicates with the other changes.
- Newly adds support for the (a & ~C) case.
Philipp Tomsich (2):
RISC-V: Use bseti/bclri/binvi to extend reach of ori/andi/xori
RISC-V: Handle "(a & twobits) == singlebit" in branches using Zbs
gcc/config/riscv/bitmanip.md | 79 +++++++++++++++++++
gcc/config/riscv/iterators.md | 8 ++
gcc/config/riscv/predicates.md | 33 ++++++++
gcc/config/riscv/riscv.h | 8 ++
.../riscv/{zbs-bclri.c => zbs-bclri-01.c} | 0
gcc/testsuite/gcc.target/riscv/zbs-bclri-02.c | 27 +++++++
gcc/testsuite/gcc.target/riscv/zbs-binvi.c | 22 ++++++
gcc/testsuite/gcc.target/riscv/zbs-bseti.c | 27 +++++++
.../gcc.target/riscv/zbs-if_then_else-01.c | 20 +++++
9 files changed, 224 insertions(+)
rename gcc/testsuite/gcc.target/riscv/{zbs-bclri.c => zbs-bclri-01.c} (100%)
create mode 100644 gcc/testsuite/gcc.target/riscv/zbs-bclri-02.c
create mode 100644 gcc/testsuite/gcc.target/riscv/zbs-binvi.c
create mode 100644 gcc/testsuite/gcc.target/riscv/zbs-bseti.c
create mode 100644 gcc/testsuite/gcc.target/riscv/zbs-if_then_else-01.c
--
2.34.1