------- Comment #5 from ian at airs dot com  2007-02-16 00:38 -------
I believe this is also related to the failure of gcc.c-torture/execute/simd-1.c
on i686-pc-linux-gnu at -O1 and above.

I think the problem is that we fail to add a REG_EQUIV note here in
local-alloc.c:

          if (REG_N_SETS (regno) == 1
              && note && ! rtx_varies_p (XEXP (note, 0), 0))
            {
              rtx note_value = XEXP (note, 0);
              remove_note (insn, note);
              set_unique_reg_note (insn, REG_EQUIV, note_value);
            }

because the insn looks like this:

(insn 213 211 214 2
/home/iant/gcc/trunk/gcc/testsuite/gcc.c-torture/execute/simd-1.c:44 (parallel
[
            (set (reg:SI 195)
                (div:SI (reg:SI 174 [ i+8 ])
                    (mem/j/c/i:SI (plus:SI (reg/f:SI 20 frame)
                            (const_int -232 [0xffffff18])) [0 j.64+8 S4 A32])))
            (set (reg:SI 196)
                (mod:SI (reg:SI 174 [ i+8 ])
                    (mem/j/c/i:SI (plus:SI (reg/f:SI 20 frame)
                            (const_int -232 [0xffffff18])) [0 j.64+8 S4 A32])))
            (clobber (reg:CC 17 flags))
        ]) 193 {*divmodsi4_nocltd} (nil)
    (expr_list:REG_DEAD (reg:SI 174 [ i+8 ])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_UNUSED (reg:SI 196)
                (nil)))))

(i.e., has two SETs).

That means that in this code:

      if (MEM_P (dest) && REG_P (src)
          && (regno = REGNO (src)) >= FIRST_PSEUDO_REGISTER
          && REG_BASIC_BLOCK (regno) >= 0
          && REG_N_SETS (regno) == 1
          && reg_equiv[regno].init_insns != 0
          && reg_equiv[regno].init_insns != const0_rtx
          && ! find_reg_note (XEXP (reg_equiv[regno].init_insns, 0),
                              REG_EQUIV, NULL_RTX)
          && ! contains_replace_regs (XEXP (dest, 0)))

the ! find_reg_note test fails where it used to succeed.  That causes us to set
reg_equiv_init to an inappropriate insn, which we later delete during reload.


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com


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

Reply via email to