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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-11-12
     Ever confirmed|0                           |1
          Component|target                      |rtl-optimization
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Combine pass is trying to combine:

Trying 5 -> 8:
    5: r98:DI=0xd7
    8: flags:CCZ=cmp(r98:DI,0)
      REG_EQUAL cmp(0xd7,0)

where:

(insn 5 2 6 2 (set (reg/v:DI 98 [ flags ])
        (const_int 215 [0xd7])) "pr112494.c":10:26 84 {*movdi_internal}
     (nil))

(insn 8 7 11 2 (set (reg:CCZ 17 flags)
        (compare:CCZ (reg/v:DI 98 [ flags ])
            (const_int 0 [0]))) "pr112494.c":12:9 8 {*cmpdi_ccno_1}
     (expr_list:REG_EQUAL (compare:CCZ (const_int 215 [0xd7])
            (const_int 0 [0]))
        (nil)))


and calls ix86_cc_mode with:

Breakpoint 1, ix86_cc_mode (code=code@entry=SET, op0=0x7fffe3e37680,
op1=0x7fffea209490)

code = SET will trigger gcc_unreachable() at the end of the ix86_cc_mode
function.

Confirmed as a generic RTL optimization problem.

Reply via email to