[RISC-V][PR target/121983] Fix unprotected REGNO invocation
So this was a naked REGNO usage, which of course blows up if RTL checking is
enabled and something else sneaks in (SUBREG). Thankfully it never results in
incorrect code, though I could theorize it could cause a bootstrap comparison
failure in the "right" circumstances.
Bootstrapped & regression tested on the Pioneer. Also regression tested on
riscv64-elf and riscv32-elf. I'll push to the trunk once pre-commit CI is
done.
jeff
PR target/121983
gcc/
* config/riscv/riscv.cc (riscv_macro_fusion_pair_p): Make sure
object is a REG before asking for its REGNO. Fix a trivial
whitespace nit.
gcc/testsuite/
* gcc.target/riscv/pr121983.c: New test.