[PATCH] D22952: [LoopVectorize] Detect loops in the innermost loop before creating InnerLoopVectorizer

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 16:12:36 PDT 2016


mkuper added a comment.

The LV change LGTM, although if anemet strongly prefers to move this out of the legality check, and into addInnerLoop, I can live with that.

I really don't know enough about graph traits to pass judgement on that. One thing I can say is that I have the nagging suspicion LoopBodyTraits should live somewhere closer to LoopInfo, and not in LoopVectorizer.cpp.


================
Comment at: test/Transforms/LoopVectorize/pr28541.ll:25
@@ +24,3 @@
+
+; CHECK: loop not vectorized
+; CHECK-LABEL: fn1
----------------
This doesn't look like it ought to work if you're only passing -loop-vectorize to opt.
Presumably, to get any kind of output except IR, you'd need either -debug (in which case you'd have to require asserts), or, as Adam suggested, -pass-remarks-missed. I agree with Adam - what you want is pass-remarks, and to check that you get "the loop body has a cycle".


https://reviews.llvm.org/D22952





More information about the llvm-commits mailing list