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][PR tree-optimization/69270] Exploit VRP information in DOM


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


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