[PATCH] D26873: [LV] Do not vectorize loops with a low dynamic tripcount, as determined by profile information

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 16:42:54 PST 2016


anemet added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:7203-7206
       ORE->emit(createMissedAnalysis(Hints.vectorizeAnalysisPassName(),
                                      "NotBeneficial", L)
                 << "vectorization is not beneficial "
                    "and is not explicitly forced");
----------------
mkuper wrote:
> anemet wrote:
> > While you're here, can you please improve this message to actually mention low-trip count?
> Sure.
Thanks.


================
Comment at: test/Transforms/LoopVectorize/X86/runtime-trip-count.ll:2
+; RUN: opt < %s  -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S -debug-only=loop-vectorize 2>&1 | FileCheck %s
+; REQUIRES: asserts
+
----------------
mkuper wrote:
> anemet wrote:
> > We usually try to formulate these tests without relying on asserts so that we get coverage with a no-assert build as well.
> I realize that, but from a testing perspective, I actually want to verify the reason it didn't get vectorized, not only that it's not vectorized.
> Do you think it would be better to duplicate the test and have an asserts and a non-asserts version? Do you know if "UNSUPPORTED: asserts" works?
> 
> (Is there a way to require asserts only for a specific run line, as opposed to the whole test? That would solve the problem.)
I'd say just use opt remarks then (-pass-remarks-missed=loop-vectorize).  In the opt output, you won't have the function name (only the source line but that required debug info).  If you want the function name, you could generate the YAML output which has everything including the function name.


https://reviews.llvm.org/D26873





More information about the llvm-commits mailing list