[Bug rtl-optimization/46315] [4.5 Regression] gcc-4.5.1 -O2 -fno-strict-overflow causes bad code generation

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 13 19:48:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46315

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org, rguenth at gcc dot
                   |                            |gnu.org, stevenb.gcc at
                   |                            |gmail dot com
          Component|tree-optimization           |rtl-optimization

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-13 19:08:02 UTC ---
RTL constant propagation (cprop3) changes

(insn 75 26 29 5 t.c:8 (set (reg/v/f:DI 83 [ s ])
        (reg/f:DI 95 [ s ])) -1 (expr_list:REG_EQUAL (plus:DI (reg/v/f:DI 83 [
s ])
            (const_int 2 [0x2]))
        (nil)))

to

(insn 75 26 29 5 t.c:8 (set (reg/v/f:DI 83 [ s ])
        (reg/f:DI 95 [ s ])) -1 (expr_list:REG_EQUAL (const_int 2 [0x2])
        (nil)))

note that the original REG_EQUAL note is suspicious anyway as it references
the set destination.  The note is correct though, reg:DI 95 is set as

(insn 11 3 12 2 t.c:5 (parallel [
            (set (reg/f:DI 95 [ s ])
                (plus:DI (reg/v/f:DI 83 [ s ])
                    (const_int 2 [0x2])))
            (clobber (reg:CC 17 flags))
        ]) 253 {*adddi_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))

RTL PRE generates insn 75 and also adds this REG_EQUAL note.

Stopping here with my investigation.



More information about the Gcc-bugs mailing list