This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31055] New: missed auto-vectorization optimization, when there is float to int conversion
- From: "tehila at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2007 12:44:31 -0000
- Subject: [Bug middle-end/31055] New: missed auto-vectorization optimization, when there is float to int conversion
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On powerpc, current auto-vectorizer does not vectorize loops that have
conversion from float to int statement in it.
For example, in case we have the following program:
#include <stdarg.h>
#define N 32
int main1 ()
{
int i;
int ib[N];
float fa[N] =
{0.2,3.1,6.7,6.9,9.8,12.3,15.4,18.9,21.0,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42};
/* int -> float */
for (i = 0; i < N; i++)
{
ib[i] = (int) fa[i];
}
/* check results: */
for (i = 0; i < N; i++)
{
if (ib[i] != (int)fa[i])
abort ();
}
return 0;
}
The vectorizer output is:
"not vectorized: relevant stmt not supported: D.2488_7 = (int) D.2487_6"
since there is no target hook for float to int conversion in rs6000 (altivec).
--
Summary: missed auto-vectorization optimization, when there is
float to int conversion
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tehila at il dot ibm dot com
GCC build triplet: powerpc-suse-linux
GCC host triplet: powerpc-suse-linux
GCC target triplet: powerpc-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31055