This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Reducing number of alias checks in vectorization.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Cong Hou <congh at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Fri, 18 Oct 2013 14:41:01 +0200
- Subject: Re: [PATCH] Reducing number of alias checks in vectorization.
- Authentication-results: sourceware.org; auth=none
- References: <CAK=A3=3sjM_MCqDoXwBXPsDiBDRGPuGh3oBkBOt_3685=dUXPw at mail dot gmail dot com> <20131002063528 dot GJ30970 at tucnak dot zalov dot cz> <CAK=A3=1xdBpi8Te5hfpYye=aLZW200=s_zhRj3HC4yKJDGkk-Q at mail dot gmail dot com> <20131002182637 dot GS30970 at tucnak dot zalov dot cz>
On Wed, Oct 2, 2013 at 8:26 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> 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.
Note that this is not equivalent because int_cst_value () sign-extends
even unsigned values (yes, a very bad name for such a function). But
I believe that in this case - comparing pointer offsets(?) - int_cst_value
is the correct function to use.