This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28029] [4.1 Regression] wrong optimization with -ftree-vectorize
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2006 14:05:03 -0000
- Subject: [Bug tree-optimization/28029] [4.1 Regression] wrong optimization with -ftree-vectorize
- References: <bug-28029-12708@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-06-14 14:05 -------
The code is basicially the same as:
void multiply(float *data_, const float *op, unsigned int size_)
{
for (unsigned int i=0; i<size_; ++i)
data_[i] *= op[i];
}
And what happens is op is data_ + 3 and size_ is 6, we will get the wrong
answer as there will be no feedback in the loop.
Anyways this is a 4.1 bug fixed already in 4.2.0
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
GCC build triplet|i686-pc-linux-gnu |
GCC host triplet|i686-pc-linux-gnu |
GCC target triplet|i686-pc-linux-gnu |
Keywords| |wrong-code
Summary|[4.2 regression] missed |[4.1 Regression] wrong
|optimization with -ftree- |optimization with -ftree-
|vectorize |vectorize
Target Milestone|--- |4.1.2
Version|4.2.0 |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28029