This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18892] missed optimization with & and ==
- From: "dnovillo at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2004 20:28:40 -0000
- Subject: [Bug tree-optimization/18892] missed optimization with & and ==
- References: <20041208201526.18892.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dnovillo at redhat dot com 2004-12-08 20:28 -------
Subject: Re: New: missed SRA of a block copy
pinskia at gcc dot gnu dot org wrote:
> The following function:
> int f(int a)
> {
> int i = a & -129;
> return i == 144;
> }
> Should be compiled to:
> int f1(int a)
> {
> return (a & -129) == 144; // aka return 0;
> }
>
> Yes this shows up in real code (gcc), found while testing out my tree combiner.
>
Hmm? What does SRA have to do with anything here?
Diego.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18892