[PATCH] D44067: [LV] Improving "Control-Flow-Select" Vectorization remark.

Vivek Pandya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 17 01:26:59 PDT 2018


vivekvpandya added a comment.

> Is there any bug reported for this? if yes then please mention that.

Well if there is no bug reported for this then do you have any motivating example or other community member has suggested this improvement?



================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4834
+        ORE->emit(createMissedAnalysis("NoCFGForSelect", SelectRemarkInstruction)
+                << "if-conversion not possible due to lack of support for predication");
         return false;
----------------
@anemet is this message ok? I would prefer "if-conversion was not possible" or previous version of it. also  should we also change remark title NoCFGForSelect to IfConversionNotPossible ?


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5717
         // !llvm.mem.parallel_loop_access implies if-conversion safety.
         if (IsAnnotatedParallel)
           continue;
----------------
Are you fetching your LLVM repository with SVN? It seems that https://github.com/llvm-mirror/llvm/blob/54cff77be9a4f9758a82381f9f12f82f59e3bb48/lib/Transforms/Vectorize/LoopVectorize.cpp#L5690 is not updated code. 
Because there is difference in code between your revision and llvm-mirror 's LV.cpp
But please make sure that all your changes are with respect to TOT (top of the tree) of LLVM's SVN repository. 


================
Comment at: test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll:48
 ; }
-; CHECK: remark: source.cpp:29:7: loop not vectorized: control flow cannot be substituted for a select
+; CHECK: remark: source.cpp:29:11: loop not vectorized: if-conversion not possible due to lack of support for predication
 ; CHECK: remark: source.cpp:27:3: loop not vectorized
----------------
Earlier revision has line number 27 as debug location of this remark. I think that is the main purpose of this patch. Could you please verify if this change is correct or not?


https://reviews.llvm.org/D44067





More information about the llvm-commits mailing list