This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/56918] New: incorrect auto-vectorization of array initialization
- From: "kretz at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Apr 2013 11:04:39 +0000
- Subject: [Bug tree-optimization/56918] New: incorrect auto-vectorization of array initialization
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56918
Bug #: 56918
Summary: incorrect auto-vectorization of array initialization
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kretz@kde.org
Compile the following testcase with "gcc -m32 -O2 -ftree-vectorize -msse2"
int main() {
double data[4];
for (int i = 0; i < 2 * 2; ++i) {
data[i] = ((i + 2) % 3) + 1;
}
if (data[0] != 3.) {
return 1;
}
return 0;
}
The first for-loop calculates the values 6, 7, 8, 9 instead of the expected 3,
1, 2, 3.