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! > The good news is we can can use my upstream GCC tester to help identify > some of these cases. So I'll put the simplify-rtx change into my tester > and see what pops out overnight on the embedded targets. > > You're also missing a ChangeLog entry for the simplify-rtx change. > Sorry I didn't catch that sooner. There is no simplify-rtx change in this patch, I think you may be mixing my patches ;-) -- Raphael Moreira Zinsly