https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124625
--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
So at least on RISC-V on these testcases I don't see this as likely improving
things. If we take the two examples we get this kind of code:
.cfi_startproc
srai a0,a0,54
andi a0,a0,504
add a1,a1,a2
add a1,a1,a0
ld a0,0(a1)
srai a0,a0,57
add a1,a1,a2
andi a5,a0,63
sh3add a0,a5,a1
ld a0,0(a0)
Yea, we get the sh3add, but IMHO neither sequence is inherently faster than the
other. The original sequence is marginally better as it encodes more densely
as the sh3add is a 4 byte insn.
Just to be clear, this probably should go forward, but we shouldn't expect
meaningful improvements on deepsjeng for RISC-V.