[PATCH] D90687: [LV] Clamp VF hint when unsafe
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 14:48:04 PST 2020
fhahn accepted this revision.
fhahn added a comment.
LGTM as well, thanks!
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5345
+ LLVM_DEBUG(dbgs() << "LV: User VF=" << UserVF
+ << " is unsafe, using maximum safe VF=" << MaxSafeVF
+ << ".\n");
----------------
nit: it seems like the message here and of the remark slightly diverged. I think it would be worth using the same 'clamping' wording as in the remark here.
================
Comment at: llvm/test/Transforms/LoopVectorize/unsafe-vf-remark.ll:3
+
+; Make sure the unsafe user specified vectorization factor is clamped.
+
----------------
It might also be interesting to add a test cases where the user provided VF is large (say 64), the max legal width is something like 32 and the profitable width selected by the cost model is something smaller (might be easier if this is a target-specific test for a specific architecture ).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90687/new/
https://reviews.llvm.org/D90687
More information about the llvm-commits
mailing list