This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34378] New: [autovectorize]: missed optimization
- From: "tim at klingt dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2007 11:42:37 -0000
- Subject: [Bug tree-optimization/34378] New: [autovectorize]: missed optimization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
in the following code, first function is vectorized, while the second one is
not:
typedef float aligned_float __attribute__((aligned(4 * sizeof(float))));
typedef aligned_float * __restrict__ restricted_float_ptr;
void test(int n, restricted_float_ptr in, restricted_float_ptr out)
{
for (int i = 0; i != n; ++i)
out[i] = in[i] + 1.f;
}
void test2(int n, aligned_float * inarg, aligned_float * outarg)
{
restricted_float_ptr in = inarg;
restricted_float_ptr out = outarg;
for (int i = 0; i != n; ++i)
out[i] = in[i] + 1.f;
}
--
Summary: [autovectorize]: missed optimization
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tim at klingt dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34378