<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">This patch extends the patches in '<span style="font-family: 'Helvetica Neue';" class="">Late evaluation of vectorization </span><font face="Helvetica Neue" class="">requirements’ (still in review). This makes the num runtime pointer checks test into a late diagnostic so we can give the user a better diagnostic message. Clang appends the diagnostic with options for getting the loop vectorized. </font><span style="font-family: 'Helvetica Neue';" class="">Here is an example of the diagnostic the user will see:</span></div><div class=""><font face="Helvetica Neue" class=""><br class=""></font></div><div class=""><span class="">"remark: loop not vectorized: cannot prove pointers refer to independent arrays in memory. The loop requires 9 runtime independence checks to safely vectorize the loop, but that would exceed the limit of 8 checks; increase the number of runtime pointer checks with the compiler option ‘-mllvm</span><span class=""></span> -runtime-memory-check-threshold=’. To avoid runtime pointer checking when you know the arrays will always be independent specify ‘#pragma clang loop vectorize(assume_safety)’ before the loop or specify ‘restrict’ on the array arguments. Erroneous results will occur if these options are incorrectly applied."</div><div class=""><br class=""></div><div class="">The diagnostic is produced when the command line option -Rpass-analysis=loop-vectorize is provided.</div><div class=""><br class=""></div><div class="">Reviews/comments are much appreciated!</div><div class=""><br class=""></div><div class="">Tyler</div><div class=""><br class=""></div><div class=""></div></body></html>