[Bug c++/35117] Vectorization on power PC
eyal at geomage dot com
gcc-bugzilla@gcc.gnu.org
Sun Feb 10 15:48:00 GMT 2008
------- Comment #23 from eyal at geomage dot com 2008-02-10 15:47 -------
(In reply to comment #22)
> 1. It looks like vectorizer was enabled in both cases, since -O3 enables the
> vectorizer by the default. You need to add -fno-tree-vectorize to disable it
> explicitly.
> 2. To get better results from vectorized version I would recommend to allocate
> arrays at boundaries aligned to 16 byte and let to the compiler to know this.
> You can do it by static allocation of arrays:
> float pSum1[64000] __attribute__ ((__aligned__(16)));
> float pSum[64000] __attribute__ ((__aligned__(16)));
> float pVec1[64000] __attribute__ ((__aligned__(16)));
> 3. It would be better if "itBegin" will start from 0 and be known at compile
> time. This and [2] will allow to vectorizer to save realigning loads.
> 4. For some strange reason the run time of this test can vary significantly (up
> to 50%) from run to run. So be sure to run it several times.
> -- Victor.
Hi,
Item 2 is problematic as the data can vary a lot and I cant use static
arrays. Im also willing to pay a "reasonable" price for the alignment extra
actions.
Item 3: I cant make itBegin start from zero, since this is how the formula
we're using works. Its calculated everytime and can vary in value.
Item 4: I saw consistent results everytime I ran it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35117
More information about the Gcc-bugs
mailing list