This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21466] New: sqrt() function not vectorised
- From: "micis at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2005 11:03:00 -0000
- Subject: [Bug tree-optimization/21466] New: sqrt() function not vectorised
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following function is not vectorised while there is a sqrt vector function
available.
#include <math.h>
void Tst1(float* __restrict__ SrcP, float* __restrict__ DstP, int Len)
{
for (int x=0; x<Len; x++)
DstP[x] = sqrt(SrcP[x]);
}
Compiled with
g++41 -O -ffast-math -S TstSqrt.cpp -ftree-vectorizer-verbose=5
-ftree-vectorize -march=opteron
gives following output:
TstSqrt.cpp:5: note: Vectorizing an unaligned access.
TstSqrt.cpp:5: note: Alignment of access forced using peeling.
TstSqrt.cpp:5: note: not vectorized: stmt not supported: D.3171_15 =
__builtin_sqrtf (D.3170_14)
TstSqrt.cpp:3: note: vectorized 0 loops in function.
Michael Cieslinski
--
Summary: sqrt() function not vectorised
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: micis at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21466