Trying to Make a Loop Auto-Vectorize

4 points by fanf


vpr

I really wish there were better (and more widely adopted!) options than clang's

#pragma clang loop vectorize(enable)

There should be an easy way to get a compile error if a given loop does not vectorize without writing disassembly scripts. Maybe I need to dig deeper into GCC's man pages.

Edit: gcc's -fopt-info-vec-missed seems a better start then the disassembly route, but still not "this must autovectorize or the build fails" ergonomics.