This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trunk][patch] fix another invalid sharing in see


> fails:
>
> (insn 30 10 28 2 /home/espindola/test.i:4 (parallel [
>            (set (subreg:SI (reg:DI 60) 0)
>                (ashiftrt:SI (reg:SI 62 [ a ])
>                    (const_int 13 [0xd])))
>            (clobber (reg:CC 17 flags))
>        ]) 522 {*ashrsi3_1} (expr_list:REG_UNUSED (reg:CC 17 flags)
>        (expr_list:REG_EQUAL (div:SI (subreg:SI (reg:DI 60) 0)
>                (const_int 8192 [0x2000]))
>            (nil))))
> /home/espindola/test.i:6: error: shared rtx
> (subreg:SI (reg:DI 60) 0)

copy_rtx_if_shared_1 has a code path similar to reset_used_flags:

switch (code)
    {
  ...
    case INSN:
    case JUMP_INSN:
    case CALL_INSN:
    case NOTE:
    case BARRIER:
      /* The chain of insns is not being copied.  */
      return;
    }

Looks like we have to use copy_rtx or change copy_rtx_if_shared to
look into INSN.

Cheers,
-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]