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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |vmakarov at gcc dot gnu.org
   Last reconfirmed|                            |2026-10-28
          Component|target                      |rtl-optimization
     Ever confirmed|0                           |1

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
The ICE is due to LRA trying to blindly eliminate argp from:

(insn 6 5 7 2 (set (reg:XF 107 [ _2 ])
        (float:XF (reg/f:DI 16 argp))) "pr128251.c":8:9 248 {floatdixf2}
     (expr_list:REG_EQUAL (float:XF (reg/f:DI 16 argp))
        (nil)))

and produces invalid RTX:

(insn 6 5 7 2 (set (reg:XF 107 [ _2 ])
        (float:XF (plus:DI (reg/f:DI 16 argp)
                (const_int 16 [0x10])))) "pr128251.c":8:9 248 {floatdixf2}
     (expr_list:REG_EQUAL (float:XF (reg/f:DI 16 argp))
        (nil)))

(plus:DI ...) does not satisfy operand constraint of the insn:

(define_insn "float<SWI48x:mode>xf2"
  [(set (match_operand:XF 0 "register_operand" "=f")
        (float:XF (match_operand:SWI48x 1 "nonimmediate_operand" "m")))]

but LRA fails to resolve this situation by spilling a temporary with the sum to
the memory.

Confirmed as rtl-optimization RA problem, CC added.

Reply via email to