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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 58315
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58315&action=edit
Proposed patch

any_divmod instructions are modelled with invalid RTX:

  [(set (match_operand:DI 0 "register_operand" "=c")
        (sign_extend:DI (match_operator:SI 3 "divmod_operator"
                        [(match_operand:DI 1 "register_operand" "a")
                         (match_operand:DI 2 "register_operand" "b")])))
   (clobber (reg:DI 23))
   (clobber (reg:DI 28))]

SImode divmod_operator (div,mod,udiv,umod) has DImode operands.

The patch adds truncate:SI to the input operand to make machine modes
consistent.

Reply via email to