[RISC-V] Improve logical and with some constants where high 32 bits in mask are clear

I was playing around with our logical sequences on Friday spurred by a case
that showed up in a BZ.  In that effort I stumbled over a second class of cases
that's pretty easy to handle.

In general if we need to do a logical AND where the mask is just a series of on
bits in the middle of a word, then that is at worst a 3 instruction sequence.
Logical shift right to clear some number of low bits, logical shift left to
clear upper bits, logical shift right to put everything into its final
position.  We already support this.

srliw is an interesting instruction in this space because it can clear the
upper 32 bits and some number of low bits at the same time.  So let's take a &
0x00000000ffff0000.

We could shift "a" right by 16, left by 48, the right again by 16. But using
slliw is better.  We just srliw by 16 bits to clear the upper 32 bits as well
as the low 16 bits.  Then slli to put the bits into their final position.  This
works for any case where the upper 32 bits are clear and there's a run of 1s in
the low 32 bits ending at bit #31.

When this applies we avoid synthesizing the constant and thus trivially reduce
our reliance on mvconst_internal to help clean things up.  This did require
tightening up an unnamed define_insn_and_split which tried to use zext.[hw] to
do bulk clearing of upper bits.  We just want it to avoid matching for cases
where the upper 32 bits are clear and we have a run of 1s ending at bit 31 on
in the mask.

Bootstrapped and regression tested on the c920 and K3 as well as regression
tested on riscv64-elf and riscv32-elf.  It's worth noting this sequence doesn't
require any special extension support, so it has the potential to trigger on
the c920.

Waiting on pre-commit before moving forward.

gcc/
	* config/riscv/riscv.cc (synthesize_and): Use srliw to handle
	clearing both upper and lower bits in some cases.
	* config/riscv/bitmanip.md (ZBA splitter using sext.w): Do not
	use in cases where we can use srliw to clear those upper bits.

gcc/testsuite
	* gcc.target/riscv/and-synthesis-1.c: New test.
3 files changed