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] |
On Tue, Feb 24, 2009 at 7:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > On Tue, Feb 24, 2009 at 3:02 AM, Richard Guenther <rguenther@suse.de> wrote: >> On Tue, 24 Feb 2009, Richard Guenther wrote: >> >>> On Mon, 23 Feb 2009, Zdenek Dvorak wrote: >>> >>> > Hi, >>> > >>> > > > > Can you have a look at the testcase in PR39233? >>> > > > >>> > > > here is a patch; I do not have time to test it just now. ?It could be >>> > > > simplified by casting the values to unsigned type in >>> > > > add_iv_value_candidates unconditionally (most of the patch makes >>> > > > us push the value of the no_overflow flag there, so that we do not >>> > > > add these casts when not necessary). >>> > > >>> > > I am going to give the patch testing, most of it looks like useful >>> > > cleanup. ?Note that using unsigned_type_for is probably not a good >>> > > idea, so I'll change it to use get_nonstandard_integer_type instead. >>> > >>> > actually, looking at the issue again, there already is a code dealing >>> > with this problem in add_candidate_1; unfortunately, there is a test >>> > excluding pointers from being casted to a safe type, which causes >>> > PR39233. ?So, it should suffice to remove that test, >>> >>> Indeed, that works. ?The previous patch bootstrapped and tested ok, >>> I'm going to test the simpler one now. >> >> Done as follows. ?Bootstrapped and tested on x86_64-unknown-linux-gnu, >> applied to trunk. >> >> Thanks, >> Richard. >> >> 2009-02-24 ?Richard Guenther ?<rguenther@suse.de> >> ? ? ? ?Zdenek Dvorak ?<ook@ucw.cz> >> >> ? ? ? ?PR tree-optimization/39233 >> ? ? ? ?* tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers >> ? ? ? ?from converting them to a generic type. >> >> ? ? ? ?* gcc.c-torture/execute/pr39233.c: New testcase. >> > > This patch may be the cause for > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39297 > > There is a problem in PR 39233 only when base is a constant. I am testing this patch. OK for trunk if there are regressions on Linux/ia32, Linux/ia64 and Linux/x86-64. Thanks. -- H.J. --- 2008-02-25 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/39297 * tree-ssa-loop-ivopts.c (add_candidate_1): Except pointers from converting them to a generic type unless the base is a constant.
Attachment:
gcc-pr39297-1.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |