This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32825] Reduction with nonzero start (arbitrary also) causes an extra add to happen



------- Comment #1 from dorit at gcc dot gnu dot org  2007-07-19 18:15 -------
...
> Though the last add is extra and does not need to be done, we can get rid of it
> by having vect_var_.36 being set initially to {e, 0, 0, 0} .

The problem is that often initializing a vector to {e, 0, 0, 0} is (much?) more
expensive than initializing a vector to {0, 0, 0, 0} and then adding e to the
final scalar result. We actually had both options in the vectorizer for a while
(guarded by ADJUST_IN_EPILOG hard-coded #define), however we didn't know how to
choose between the two options (cost wise), so we just arbitrarily chose one.
Now that we're starting to build a cost model we may try to evaluate which of
the two options to generate. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32825


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]