This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RTL sharing tester (for testing)
> Jan Hubicka <jh@suse.cz> wrote:
> > The problem with is that the nature of problem is very target specific.
> > All the remaining problems are either very weird side cases, or target
> > issues. This is why I am posting the patch so people can test it on
> > their favorite development platform.
>
> FYI, I've tried your tester on SH and got an error which looks
> similar to PPC's one:
>
> ../../../../../../TMP/trunk/libjava/classpath/native/fdlibm/e_exp.c:164: error: invalid rtl sharing found in the insn
> (insn:HI 207 303 256 24 ../../../../../../TMP/trunk/libjava/classpath/native/fdlibm/e_exp.c:162 (parallel [
> (set (reg/v:DF 76 fr12 [orig:180 x ] [180])
> (mult:DF (reg/v:DF 76 fr12 [orig:180 x ] [180])
> (reg:DF 66 fr2)))
> (use (reg/v:PSI 151 ))
> ]) 340 {muldf3_i} (expr_list:REG_DEAD (reg/v:PSI 151 )
> (expr_list:REG_DEAD (subreg:DF (reg/v:DI 1 r1 [orig:178 sh_u ] [178]) 0) (expr_list:REG_DEAD (reg:DF 66 fr2)
> (expr_list:REG_EQUAL (mult:DF (subreg:DF (reg/v:DI 1 r1 [orig:178 sh_u ] [178]) 0)
> (const_double:DF 9.33263618503218878990089544723817169617091446372e-302 [0x0.8p-999]))
> (nil))))))
> ../../../../../../TMP/trunk/libjava/classpath/native/fdlibm/e_exp.c:164: error: shared rtx
> (subreg:DF (reg/v:DI 1 r1 [orig:178 sh_u ] [178]) 0)
> ../../../../../../TMP/trunk/libjava/classpath/native/fdlibm/e_exp.c:164: internal compiler error: internal consistency failure
>
> and SH bootstraps without Java. As an experiment, I've tried a one
> liner:
>
> --- ORIG/trunk/gcc/df-problems.c 2007-06-22 09:16:00.000000000 +0900
> +++ TMP/trunk/gcc/df-problems.c 2007-06-26 13:53:47.000000000 +0900
> @@ -3713,7 +3713,8 @@ df_set_note (enum reg_note note_type, rt
> }
>
> /* Did not find the note. */
> - REG_NOTES (insn) = alloc_EXPR_LIST (note_type, reg, REG_NOTES (insn));
> + REG_NOTES (insn) = alloc_EXPR_LIST (note_type, copy_rtx (reg),
> + REG_NOTES (insn));
> return old;
> }
>
> Then the above error on SH went away. This one liner may be
> an overkill, but I hope that this experiment will help experts
> to narrow down the problem.
Actually this seems like a correct fix for me. In fact I was just
looking into instance of identical problem on PPC bootstrap (different
file, same directory of libjava :). We will copy iff the reg actually
is subreg and in that case we are required to copy.
I am re-testing PPC targets with this fix in now.
Thanks a lot!
Honza
>
> Regards,
> kaz