[PATCH] D33396: [LV] Report multiple reasons for not vectorizing under allowExtraAnalysis

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 14:09:29 PDT 2017


anemet accepted this revision.
anemet added a comment.

This is a good idea.  LGTM too.



================
Comment at: test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll:45-46
 ; CHECK: warning: source.cpp:19:5: loop not vectorized: failed explicitly specified loop vectorization
+; CHECK: remark: <unknown>:0:0: loop not vectorized: control flow cannot be substituted for a select
+; CHECK: remark: <unknown>:0:0: loop not vectorized
 
----------------
I think this is pretty meaningless without source line info.  Why don't you add new DILocation metadata with unique source line numbers specifically for the loop so that you can check them here.

This test is also weirdly structured because there is no easy way to tie back source lines for the remarks to the corresponding function.  Can you reorder this while you're here, like this?:

; source code 1
; CHECK: ...

; source code 2
; CHECK: ...

etc?


https://reviews.llvm.org/D33396





More information about the llvm-commits mailing list