This is the mail archive of the
mailing list for the GCC project.
Re: [PR64817-related 3/3] simplify xor of (and or ior) of xor
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>,gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Feb 2015 10:54:54 +0100
- Subject: Re: [PR64817-related 3/3] simplify xor of (and or ior) of xor
- Authentication-results: sourceware.org; auth=none
- References: <orvbjip56w dot fsf at livre dot home> <20150204083513 dot GF1746 at tucnak dot redhat dot com> <0D62BEA8-3A49-48BB-B1B9-1F76AB864197 at gmail dot com> <20150204091530 dot GG1746 at tucnak dot redhat dot com>
On February 4, 2015 10:15:30 AM CET, Jakub Jelinek <firstname.lastname@example.org> wrote:
>On Wed, Feb 04, 2015 at 09:54:53AM +0100, Richard Biener wrote:
>> On February 4, 2015 9:35:13 AM CET, Jakub Jelinek <email@example.com>
>> >On Wed, Feb 04, 2015 at 04:21:43AM -0200, Alexandre Oliva wrote:
>> >> I'm a bit surprised the gimple layer does not even attempt to
>> >> them, but I didn't try to tackle that, since I was not even sure
>> >> was a useful optimization. After all, how often do we see xor of
>> >> xor of and of xor of... in the wild, rather than in pathological
>> >> testcases? :-) But hey, at least the rtl simplification is cheap,
>> >> why not?
>> >I think we should teach at least VRP to simplify debug stmts
>> >it simplifies normal comparisons etc. using value ranges, but that
>> >would be
>> >stage1 material.
>> So I suppose this is only about debug exprs and we optimize regular
>> well? Otherwise adding some patterns to match.PD could help.
>Sure. For e.g. VRP I meant that simplify_stmt_using_ranges could also
>attempt to simplify (some) debug_bind stmts, similarly how it optimizes
Sure. Of course it's bad that debug stmts use Generic... General fold-stmt could do some of the work. Also that debug temps have no use-def chains doesn't help too much.