On 11/17/22 07:43, Philipp Tomsich wrote:
On Thu, 17 Nov 2022 at 15:30, Jeff Law <jeffreya...@gmail.com> wrote:
On 11/10/22 14:36, Philipp Tomsich wrote:
Add a split for cases where we can use two bclri (or one bclri and an
andi) to clear two bits.
gcc/ChangeLog:
* config/riscv/bitmanip.md (*bclri<mode>_nottwobits): New pattern.
(*bclridisi_nottwobits): New pattern, handling the sign-bit.
* config/riscv/predicates.md (const_nottwobits_operand):
New predicate.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zbs-bclri.c: New test.
Don't we only have to worry about (subreg:DI (reg:SI )) to preserve the
extension constraints? Not that I think there's any value in allowing
That is the reason for the !paradoxical_subreg_p(...) check in
"bclri<mode>_nottwobits"... so at pattern will always be safe.
Do you see a risk on the "*bclridisi_nottwobits"?
It's jut a sanity check for me, I don't have any concerns since you're
avoiding this when working on a paradoxical. But it does make me wonder
if we need a paradoxical check on the other bit twiddles patterns to
prevent them from changing the SImode sign bit in a paradoxical.
Jeff