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: [PATCH] Reducing number of alias checks in vectorization.


On Wed, Oct 02, 2013 at 10:50:21AM -0700, Cong Hou wrote:
> >> +  if (int_cst_value (p11.offset) != int_cst_value (p21.offset))
> >> +    return int_cst_value (p11.offset) < int_cst_value (p21.offset);
> >
> > This is going to ICE whenever the offsets wouldn't fit into a
> > HOST_WIDE_INT.
> >
> > I'd say you just shouldn't put into the vector entries where offset isn't
> > host_integerp, those would never be merged with other checks, or something
> > similar.
> 
> Do you mean I should use widest_int_cst_value()? Then I will replace
> all int_cst_value() here with it. I also changed the type of "diff"
> variable into HOST_WIDEST_INT.

Actually, best would be just to use
tree_int_cst_compare (p11.offset, p21.offset)
that will handle any INTEGER_CSTs, not just those that fit into HWI.

	Jakub


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