3 ms·
With clang you can add "#pragma clang loop vectorize(assume_safety)" to a loop to reduce the burden of proof of vectorizability and to do it if at all possible,
by dzaima 2y ago
With clang you can add "#pragma clang loop vectorize(assume_safety)" to a loop to reduce the burden of proof of vectorizability and to do it if at all possible, giving a warning when it fails to. gcc has "#pragma GCC ivdep" to reduce dependency analysis, but it's not as powerful as clang's pragma.
- nextaccountic 2y ago> giving a warning when it fails to This is the critical point. If CI fails or otherwise you are warned when the loop doesn't vectorize, then you can count on it to always happen