Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Last active November 6, 2018 08:59
Show Gist options
  • Save Trass3r/facc684ad501ca342ae8d87b342977ea to your computer and use it in GitHub Desktop.
Save Trass3r/facc684ad501ca342ae8d87b342977ea to your computer and use it in GitHub Desktop.
auto-vectorization report compiler flags
# useful to test auto-vectorization on different compilers
# https://godbolt.org/z/mUdeQn
# gcc
-Wall -W -std=c++2a -fopenmp-simd -O3 -ffast-math -march=haswell -fopt-info-vec-omp-optimized-missed
# clang
-Wall -W -Werror=pass-failed -std=c++2a -fopenmp-simd -O3 -ffast-math -march=haswell -Rpass="loop|vect" -Rpass-missed="loop|vect" -Rpass-analysis="loop|vect"
# icc on Linux
-Wall -std=c++17 -qopenmp-simd -O3 -ffast-math -march=haswell -qopt-report-file=stdout -qopt-report-format=vs -qopt-report=5 -qopt-report-phase=loop,vec
# msvc
-W4 -std:c++latest -openmp -O2 -fp:fast -arch:AVX2 -Qvec-report:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment