This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR64817-related 3/3] simplify xor of (and or ior) of xor
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Feb 2015 09:35:13 +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>
- Reply-to: Jakub Jelinek <jakub at redhat dot 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 simplify
> them, but I didn't try to tackle that, since I was not even sure this
> was a useful optimization. After all, how often do we see xor of and of
> xor of and of xor of... in the wild, rather than in pathological
> testcases? :-) But hey, at least the rtl simplification is cheap, so
> why not?
I think we should teach at least VRP to simplify debug stmts similarly how
it simplifies normal comparisons etc. using value ranges, but that would be
stage1 material.
> Regstrapped on x86_64-linux-gnu and i686-pc-linux-gnu. Ok to install?
>
> for gcc/ChangeLog
>
> * simplify-rtx.c (simplify_binary_operation_1): Simplify one
> of two XORs that have an intervening AND or IOR.
Ok, thanks.
Jakub