This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Jan 2016 12:49:56 +0100
- Subject: Re: [PATCH][PR tree-optimization/69270] Exploit VRP information in DOM
- Authentication-results: sourceware.org; auth=none
- References: <5697508C dot 6050006 at redhat dot com> <20160114074643 dot GX3017 at tucnak dot redhat dot com> <20160114074919 dot GL22971 at tucnak dot redhat dot com> <5697E5A2 dot 4050105 at redhat dot com> <56997381 dot 7010101 at redhat dot com> <mvm1t9fp1ii dot fsf at hawking dot suse dot de> <569CCEBD dot 7090701 at foss dot arm dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jan 18, 2016 at 11:38:37AM +0000, Kyrill Tkachov wrote:
> On 18/01/16 11:31, Andreas Schwab wrote:
> >Jeff Law <law@redhat.com> writes:
> >
> >>commit 1384b36abcd52a7ac72ca6538afa2aed2e04f8e0
> >>Author: Jeff Law <law@tor.usersys.redhat.com>
> >>Date: Fri Jan 15 17:15:24 2016 -0500
> >>
> >> PR tree-optimization/69270
> >> * tree-ssanames.c (ssa_name_has_boolean_range): Moved here from
> >> tree-ssa-dom.c. Improve test for [0..1] ranve from VRP.
> >> * tree-ssa-dom.c (ssa_name_has_boolean_range): Remove.
> >> * tree-ssanames.h (ssa_name_has_boolean_range): Prototype.
> >> * tree-ssa-uncprop.c (associate_equivalences_with_edges): Use
> >> ssa_name_has_boolean_range and constant_boolean_node.
> >> PR tree-optimization/69270
> >> * gcc.dg/tree-ssa/pr69270-2.c: New test.
> >> * gcc.dg/tree-ssa/pr69270-3.c: New test.
> >This breaks gcc.target/aarch64/tst_3.c.
> >
> > //.tune generic
> > .type f1, %function
> > f1:
> >- tst x0, 1
> >- csinc w0, w0, wzr, eq
> >+ ands w1, w0, 1
> >+ csel w0, w1, w0, ne
> > ret
> > .size f1, .-f1
>
> The two sequences look equally valid to me.
> Instead of doing an and-compare followed by a conditional increment
> we do an and-compare followed by a conditional select (without discarding
> the result of the and).
> So the testcase should be adjusted.
> I'll do it.
IMHO please wait for the resolution of PR69320 here.
Jakub