This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/65204] New: Aligned address optimization not detected
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Feb 2015 11:13:48 +0000
- Subject: [Bug tree-optimization/65204] New: Aligned address optimization not detected
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65204
Bug ID: 65204
Summary: Aligned address optimization not detected
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktietz at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
By testing on c++-delayed-folding branch I noticed that gcc doesn't optimize
issues as tested in 'c-c++-common/fold-bitand4.c' anymore.
By looking deeper into it it shows that CCP doesn't simplify this because it
doesn't track about copy-of.
The testcase demonstrates this:
typedef char char4[4] __attribute__ ((aligned (4)));
char4 c4[4] __attribute__ ((aligned (16)));
int f (int i)
{
__SIZE_TYPE__ h = (__SIZE_TYPE__)&c4[i];
/* 0 */
return 3 & h;
}