[PATCH] D94779: [Clang] Ensure vector predication pragma is ignored only when vectorization width is 1.
Sjoerd Meijer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 18 03:38:54 PST 2021
SjoerdMeijer added a comment.
I am trying to remember details here, but first about this:
> vectorize_width(1) is also used, since that effectively disables vectorization.
I am not sure this is true (i.e. effectively disabling auto-vec) since in LangRef we specify:
> The vector width is specified by vectorize_width(_value_[, fixed|scalable]), where _value_ is a positive integer and the type of vectorization can be specified with an optional second parameter.
So, I *think* `vectorize_width(1)` enables the vectoriser, just the width is set to 1. And this explains why I added that condition `VectorizeWidth < 1`.
This leads me to wonder what the actual problem is with this?
================
Comment at: clang/test/CodeGenCXX/pragma-loop-predicate.cpp:102
+
+// CHECK-NEXT: ![[LOOP7]] = distinct !{![[LOOP7]], [[MP]], [[GEN8]], [[GEN11:![0-9]+]], [[GEN3]]}
+// CHECK-NEXT: [[GEN11]] = !{!"llvm.loop.vectorize.width", i32 4}
----------------
malharJ wrote:
> SjoerdMeijer wrote:
> > Do we also expect:
> >
> > !{!"llvm.loop.vectorize.predicate.enable", i1 false}
> >
> > here since the test sets:
> >
> > vectorize_predicate(disable) vectorize_width(4)
> GEN8 covers checking for that ?
Ah yep, of course, I missed that, so ignore this!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94779/new/
https://reviews.llvm.org/D94779
More information about the cfe-commits
mailing list