This is the mail archive of the 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: copyprop_hardreg_forward removes division

Lars Brinkhoff <> writes:
> Jan Hubicka <> writes:
> > Lars Brinkhoff wrote:
> > > I have a problem with a dissapearing division instruction.
> > It looks like you are having same problem as I had. copyprop_hardreg misses
> > the stores to subregs.  I've commited fix to that so hope it is OK in the
> > tree (see kill_value).
> No.  I'm using the trunk of the tree, updated yesterday, and your
> patch seems to be there

kill_set_value is called with the SUBREGs, so I need something like
this, or else kill_set_value will never call kill_value.  However,
this duplicates what your patch did to kill_value, so maybe we can
just change "REG_P(x)" to "(REG_P (x) || GET_CODE (x) == SUBREG)"
or something.

What do you think?  I'll make a fully tested patch when I know what
the best solution is.

*************** kill_set_value (x, set, data)
*** 1186,1191 ****
--- 1186,1195 ----
       void *data;
    struct value_data *vd = data;
+   if (GET_CODE (x) == SUBREG)
+     x = simplify_subreg (GET_MODE (x), SUBREG_REG (x),
    if (GET_CODE (set) != CLOBBER && REG_P (x))
        kill_value (x, vd);

Lars Brinkhoff     Linux, GCC, PDP-10,
Brinkhoff Consulting    HTTP programming

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