Specifying the vectorization width was supposed to implicitly enable
vectorization, except that it wasn't really doing this. It was only
setting the vectorize.width metadata, but not vectorize.enable.
This should also fix PR27643.
Paths
| Differential D66290
[clang] Pragma vectorize_width() implies vectorize(enable) ClosedPublic Authored by SjoerdMeijer on Aug 15 2019, 6:11 AM.
Details Summary Specifying the vectorization width was supposed to implicitly enable This should also fix PR27643.
Diff Detail Event TimelineComment Actions
It would be good to have a test case for that. Comment Actions Thanks for looking again! (forgot to add this message when I uploaded the new diff) Comment Actions I think it would be slightly better to split off the change to disable vectorization via llvm.loop.vectorize.enable=false instead of width=1. This changes the behaviour from "disable vectorization, but allow interleaving in the vectoriser" to "disable the vectoriser". IMO this change makes sense, but it is probably better/safer to do it separately. Comment Actions Thanks, and sorry for the delay. Back in the office now, and I am addressing this:
Yep, I agree Comment Actions
This is now D66796. I will now start stripping it out from this patch. This revision is now accepted and ready to land.Aug 27 2019, 9:32 AM Comment Actions Just uploading new diff for completeness; I only had to change a test-case, and thus thought that committing this is okay. Many thanks again for reviewing and helping with the discussions! Closed by commit rL372082: [Clang] Pragma vectorize_width() implies vectorize(enable) (authored by SjoerdMeijer). · Explain WhySep 17 2019, 1:42 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 215379 clang/lib/CodeGen/CGLoopInfo.cpp
clang/test/CodeGenCXX/pragma-loop-predicate.cpp
clang/test/CodeGenCXX/pragma-loop-safety.cpp
clang/test/CodeGenCXX/pragma-loop.cpp
|