[Bug target/20126] [3.3/3.4/4.0 Regression] Inlined memcmp makes one argument null on entry

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Feb 22 17:03:00 GMT 2005


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-22 11:32 -------
I think the bug is in loop_giv_rescan assumes validate_change in:
      if (v->giv_type == DEST_ADDR)
        /* Store reduced reg as the address in the memref where we found
           this giv.  */
        validate_change (v->insn, v->location, v->new_reg, 0);

can't fail, but it indeed fails when replacing (reg/v/f:DI 67 [ lhs ])
with v->new_reg (plus:DI (reg:DI 90) (const_int -1)), as
(insn 66 65 67 (parallel [
            (set (reg:CC 17 flags)
                (if_then_else:CC (ne (reg:DI 62 [ pretmp.25 ])
                        (const_int 0 [0x0]))
                    (compare:CC (mem:BLK (plus:DI (reg:DI 90)
                                (const_int -1 [0xffffffffffffffff])) [0 A8])
                        (mem:BLK (reg/v/f:DI 66 [ rhs ]) [0 A8]))
                    (const_int 0 [0x0])))
            (use (const_int 1 [0x1]))
            (use (reg:CC 17 flags))
            (use (reg:SI 19 dirflag))
        ]) -1 (nil)
    (nil))
is not valid x86_64 insn - cmpstrqi_rex_1 requires (mem:BLK (match_operand:DI 4
"register_operand" "0")).

Not sure if it is not too late though, maybe_eliminate_biv already said it can
be eliminated.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org


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



More information about the Gcc-bugs mailing list