This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix reassoc range opt related ICE (PR tree-optimization/81003)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Jun 2017 11:34:37 +0200
- Subject: Re: [PATCH] Fix reassoc range opt related ICE (PR tree-optimization/81003)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CDCD9C04B316
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CDCD9C04B316
- References: <20170608184906.GA2154@tucnak> <alpine.LSU.2.20.1706091129090.7349@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jun 09, 2017 at 11:29:48AM +0200, Richard Biener wrote:
> > force_gimple_operand_gsi called by update_range_test can using match.pd
> > simplifications sometimes return INTEGER_CST (especially when cunroll
> > unrolled code isn't really optimized by forwprop/ccp and similar passes
> > before reassoc2), but that is something not acceptable to the rest of
> > the optimize_range* code, because it needs to know not just the value,
> > but also some gimple_stmt_iterator to insert related code etc.
> >
> > This patch makes sure we have a SSA_NAME even in that case.
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> Ok.
>
> In the end this results in a missed optimization downstream but I
> guess we can't resolve this w/o major refactoring?
The constants should be propagated into uses soon afterwards, there
is both forwprop and ccp shortly after the first reassoc pass and
e.g. dom/vrp2 after second reassoc pass that should fix it up.
Jakub