Hacker News new | past | comments | ask | show | jobs | submit login

While this is true, the masking is more important for control flow in the loops. You can sometimes replace if/else statements with the masked registers allowing loops with simple conditionals to be vectorized.



What you say is right, but it is not related to this gcc announcement, which refers strictly to replacing the AVX2 prologue and epilogue codes, which were still being generated even when the loop was vectorized with AVX-512 instead of AVX2.

I do not know if gcc is already smart enough to use masking for control flow, but there exists the also free ispc compiler which does it, allowing one to write programs in CUDA style for CPUs with AVX-512, like AMD Zen 4.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: