4 ms·
GCC vectorizes the sum fine if the input is unsigned bytes, cf [1]. My guess is some odd interaction between integer promotions and the backend. [1] http://goo
by pbsd 12y ago
GCC vectorizes the sum fine if the input is unsigned bytes, cf [1]. My guess is some odd interaction between integer promotions and the backend.
[1] http://goo.gl/B7KX1V http://goo.gl/B7KX1V
- deleted 12y ago[deleted]
- detrino 12y agoI think it's just the type of the accumulator[1] that influences this, GCC seems to vectorize it fine for any type other than signed char/signed short. [1] s in your code, result in the author's Edit: The reason for the failure appears to be this: test.c:7:2: note: reduction: not commutative/associative: s_11 = (int8_t) _10; Edit: GCC vectorizes this fine when compiling with -fwrapv, which gives you the semantics the author probably expected.
- jxf 12y agoThis link seems to be breaking the HN comments for this page. :)