This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18892] New: missed SRA of a block copy
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2004 20:15:28 -0000
- Subject: [Bug tree-optimization/18892] New: missed SRA of a block copy
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.
--
Summary: missed SRA of a block copy
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
BugsThisDependsOn: 15459
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18892