https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97873

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #4)
> So then either we should expand the SWI48x mode abs for !TARGET_EXPAND_ABS
> into
> a pre-reload define_insn_and_split with abs that we'd split almost like
> smax, except for using the result of neg for the condition codes (and we'd
> need to see how it plays with STV), or add a define_insn_and_split that
> would match what the combiner is trying:
>         (set (reg:SI 84)
>             (smax:SI (neg:SI (reg/v:SI 83 [ x ]))
>                 (reg/v:SI 83 [ x ])))
>         (clobber (reg:CC 17 flags))
> and again split that cmov consumer of neg as flag setter (and again see what
> STV does with that).

This should be done after combine pass, so STV has a chance to convert min/max
to SSE instructions.  Effectively that means that only a peephole2 is feasible.

Reply via email to