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
tree: 35c784647aa62f99cb62a75a0e4adb4a24789d7d
  1. src/
  2. .gitignore
  3. CMakeLists.txt
  4. LICENSE
  5. skcms.c
  6. skcms.h
  7. tests.c