https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124007
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks|120763 |
--- Comment #6 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Sadly, converting those branch-on-bit patterns to a simpler define_split makes
things worse. The problem is the define_insn_and_split allows creating this:
(set (pc)
(if_then_else (eq (zero_extract:DI (reg:DI 160 [ _5 ])
(const_int 1 [0x1])
(const_int 21 [0x15]))
(const_int 0 [0]))
(label_ref 43)
(pc)))
As a single insn pattern, even though it's really going to turn into two
instrutions. So like in so many cases it's bypassing combine's model for
costing splits.
Anyway, by not matching that form, we're never able to take advantage of the
ability to move the bit into the sign bit via a shift and use ble/bgt with x0.
It probably needs to queue up behind fixing mvconst_internal.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120763
[Bug 120763] [meta-bug] Tracker for bugs to visit during weekly RISC-V meeting