This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51890] New: vectorizer does not recognize intrinsic functions like sqrt
- From: "Heiko.Klein at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Jan 2012 09:33:37 +0000
- Subject: [Bug tree-optimization/51890] New: vectorizer does not recognize intrinsic functions like sqrt
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51890
Bug #: 51890
Summary: vectorizer does not recognize intrinsic functions like
sqrt
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Heiko.Klein@gmx.net
Created attachment 26360
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26360
test code which does not vectorize properly
Compiling attached program with
gcc4.6.2/bin/gcc -std=c99 -O2 -mfpmath=sse -msse2 -lm -o test_novector
test_novector.c -ftree-vectorize -ftree-vectorizer-verbose=2
results in the comment:
test_novector.c:8: note: not vectorized: loop contains function calls or data
references that cannot be analyzed
(older compilers, i.e. gcc4.4.3 just complain about data reference)
The only function call is sqrt(), but sqrt is an intrinsic vectorized function
(_mm_sqrt_pd) and can be easily vectorized.
Due to missing vectorization, this code is 2x (4x with AVX) slower than
compiled with other compilers (tested against icc12).