On 12/29/22 05:23, Raphael Zinsly wrote:
On Wed, Dec 28, 2022 at 10:36 PM Jeff Law <jeffreya...@gmail.com> wrote:



On 12/28/22 11:18, Raphael Moreira Zinsly wrote:
The Zbb min/max pattern was not matching 32-bit sources when
compiling for 64-bit.
This patch separates the pattern into SImode and DImode, and
use a define_expand to handle SImode on 64-bit.
zbb-min-max-02.c generates different code as a result of the new
expander.  The resulting code is as efficient as the old code.
Furthermore, the special sh1add pattern that appeared in
zbb-min-max-02.c is tested by the zba-shNadd-* tests.

       gcc/ChangeLog:

               * config/riscv/bitmanip.md
               (<bitmanip_optab><mode>3): Divide pattern into
               <bitmanip_optab>si3_insn and <bitmanip_optab>di3.
               (<bitmanip_optab>si3): Handle SImode sources on
               TARGET_64BIT.

       gcc/testsuite:

               * gcc.target/riscv/zbb-abs.c: New test.
               * gcc.target/riscv/zbb-min-max-02.c: Addapt the
               expected output.
So we need to do a bit of x86 debugging.

Given the regressions below on the x86 testsuite, we should assume there
may be other targets where the optimization might result in testsuite
regressions.

Thanks for checking it!
lol, you're right. I'm mushing together your stuff in my head! So we've got a couple TODOs for the ctz/clz improvements before they can be submitted ;-)

jeff

Reply via email to