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

--- Comment #17 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Fixing the remaining part of the regression would require adding patterns to
match

Trying 400 -> 402:
  400: r264:SI=r180:SI 0>>0x5+r180:SI
  402: r180:SI={(cc:CC>=0)?r264:SI:r180:SI}
      REG_DEAD r264:SI
Failed to match this instruction:
(set (reg/v:SI 180 [ y ])
    (plus:SI (mult:SI (lshiftrt:SI (reg/v:SI 180 [ y ])
                (const_int 5 [0x5]))
            (ge:SI (reg:CC 80 cc)
                (const_int 0 [0])))
        (reg/v:SI 180 [ y ])))

This is equivalent to

(set (reg:SI 180)
     (if_then_else:SI (ge (reg:CC 80 cc) (const_int 0))
       (plus (lshiftrt:SI (reg:SI 180) (const_int 5)) (reg:SI 180))
       (reg:SI 180)))

but in a different form (because r180 appears in both arms).  We could do this,
but it will likely take a number of additional patterns to handle.  Perhaps too
complex for stage 4.

Another issue is that the MULT form is not compatible with the way compare-elim
works, so we'd need to rewrite the pattern before that pass in a form that was
compatible.

Reply via email to