On 5/31/24 9:07 AM, Robin Dapp wrote:
Hi,

ifcvt likes to emit

(set
   (if_then_else)
     (ge (reg 1) (reg2))
     (reg 1)
     (reg 2))

which can be recognized as min/max patterns in the backend.
This patch adds such patterns and the respective iterators as well as a
test.

This depends on the generic ifcvt change.
Regtested on rv64gcv_zvfh_zicond_zbb_zvbb.

Regards
  Robin

gcc/ChangeLog:

        * config/riscv/bitmanip.md (*<bitmanip_minmax_cmp_insn>_cmp_<mode>3):
        New min/max ifcvt pattern.
        * config/riscv/iterators.md (minu): New iterator.
        * config/riscv/riscv.cc (riscv_noce_conversion_profitable_p):
        Remove riscv-specific adjustment.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/zbb-min-max-04.c: New test.
OK once prereqs are ACK'd.


Presumably this fixes that deepsjeng missed if-conversion we kicked around a couple months back?


jeff

Reply via email to