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

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Hongtao Liu from comment #1)
> Since they're different modes, CCZ for cmp, but CCS for kortest, it could be
> diffcult to optimize it in RA stage by adding alternatives(like we did for
> compared to 0). So the easy way could be adding peephole to hanlde that.

You can use pre-reload split for this. Please see for example how *jcc_bt<mode>
and *bt<mode>_setcqi provide compound operation (constructed from CCZmode
compare) that is later split to CCCmode operation. You will have to provide jcc
and setcc patterns to fully handle mode change.

Reply via email to