skia /
skcms /
2a1681b42ef5e58ce7a10d813b350f8422886fe2 vectorize with GCC too
This required a small amount of back bending to make work:
- You can't just say F val = 0 (or = 0.0f, etc.)
in GCC. So instead I've made an F0 constant. Oddly,
math with scalars works, just not assignment. I briefly
considered
F val;
val -= val; // or val ^= val;
but the warnings guided me towards a saner path.
- Clang supports the vector_size attribute, but its
vector_size vectors don't support quite as many
operations as GCC's vector_size vectors or Clang's
own ext_vector_type vectors... so we keep them split.
- GCC doesn't have __builtin_convertvector(). Luckily,
both GCC and Clang caught on to what I was doing when
I just wrote out the casts one lane at a time.
No codegen differences for Clang, and GCC now looks good.
I think it'll be sustainable to keep these both happy,
but reserve the right to ditch GCC later on.
Change-Id: Iaab21ba09bf5371d1ab145f1b3ab88183c5ffa72
1 file changed