<div>Thank you for the reference. Very interesting read!</div><div> </div><div>There are couple questions though:</div><div>- What is the implementation status of this effort?</div><div>- I didn't find anything on masked low-trip/remainder vectorization through what I've read. I believe for AVX512 and other masking-enabled targets (e.g. VPU) masking may be preferred technique for low trip count vectoization.</div><div> </div><div>By masked low-trip vectorization I mean something along the lines of following transformation:</div><div> </div><div>for (i = 0; i < smallN; ++i) {</div><div>op;</div><div>}</div><div> </div><div>Transformed to:</div><div> </div><div><div>for (i = 0; i < round_UP_to_multiple_of_VL(smallN, VL); ++i) {</div><div>if (i < smallN)</div><div>op;</div><div>}</div><div> </div><div>And than vectorize by VL with mask.</div><div> </div></div><div>Where (assuming VL -- is small power of 2)</div><div>round_up_to_multiple_of_VL(x, consexpr VL) {</div><div>return (x + ~VL) ^ ~VL;</div><div>}</div><div> </div><div>Thank you,</div><div>Serge.</div><div> </div><div> </div><div>23.06.2017, 01:14, "Friedman, Eli via llvm-dev" <llvm-dev@lists.llvm.org>:</div><blockquote type="cite"><div bgcolor="#FFFFFF"><div>On 6/21/2017 6:16 AM, hameeza ahmed via llvm-dev wrote:</div><blockquote type="cite" cite="mid:CAFMPKeZNLxe0vS6uZOLgHpv_D_C5YEBD6=nq448ri-5G-WBhzw@mail.gmail.com"><div><div style="font-family:sans-serif;font-size:16px;">when i generate code with 72 loop iterations.</div><div style="font-family:sans-serif;font-size:16px;"> </div><div style="font-family:sans-serif;font-size:16px;">the compiler generates code with using avx512 zmm operations 4 times (16x4=64) and remaining 8 iterations are handled by routine mov operations with EAX register. wouldn't it be better if it uses ymm for remaining 8 iterations as it does when iteration count is between 8 and 15. same for xmm and so on.</div></div></blockquote><br />See <a href="http://lists.llvm.org/pipermail/llvm-dev/2017-February/110424.html">http://lists.llvm.org/pipermail/llvm-dev/2017-February/110424.html</a> .<br /><br />-Eli<pre>-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre></div>,<p>_______________________________________________<br />LLVM Developers mailing list<br /><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br /><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></p></blockquote>