You don't need to add metadata to test/Transforms/LoopVectorize/X86/vectorization-remarks.ll And if optimization remarks are only emitted in DEBUG (or RELEASE+ASSERTS) build, please add the following line in the beginning of your file. Thanks. REQUIRES: asserts http://reviews.llvm.org/D3456