Equivalent of -ftree-vectorizer-verbose for clang

clang, clang++

Solution

clang has following options to print diagnostics related to vectorization:

-Rpass=loop-vectorize identifies loops that were successfully vectorized.

-Rpass-missed=loop-vectorize identifies loops that failed vectorization and indicates if vectorization was specified.

-Rpass-analysis=loop-vectorize identifies the statements that caused vectorization to fail.

Source: http://llvm.org/docs/Vectorizers.html

Problem

The question is about how to make `clang` print information on which loops (or other parts of code) have been vectorized. `GCC` has a command line switch named `-ftree-vectorizer-verbose=6` to do this (or `-fopt-info-vec` in newer versions of GCC), but I couldn't find anything similar for `clang`. Does `clang` support this or my only option is to peek in the disassembly ?

Original source