This is the mail archive of the gcc@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] |
Dale Johannesen <dalej@apple.com> writes:On Jan 2, 2004, at 2:19 PM, Falk Hueffner wrote:I was just wondering about vectorization for platforms without proper vector instructions like Alpha. Sometimes, vectorization could still be a noticeable win, for example transforming
... Does this seem like a good idea? Are there other targets which would profit from it?
Yes, most RISCs, but you have to watch out for alignment.
Isn't that the same for architectures with special vector instructions? I was under the impression that most require strict alignment, so I was assuming the infrastructure would already ensure this...
char *s1, *s2, *d; for (i = 0; i < 8; i++) d[i] = s1[i] + s2[i]
to
uint64_t x = load(s1), y = load(s2); uint64_t signmask = 0x8080808080808080; uint64_t signs = (x ^ y) & signmask; x &= ~signmask; y &= ~signmask; x += y; x ^= signs; store(d, x);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |