[PATCH] D103700: [LV] Fix bug when unrolling (only) a loop with non-latch exit

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 25 12:36:51 PDT 2021


reames added a comment.

In D103700#2839620 <https://reviews.llvm.org/D103700#2839620>, @Ayal wrote:

> This was indeed what was suggested, thanks for following up! The patch correctly fixes the bug raised by the test case, right? I.e., the last iteration of the "vector" (unrolled) loop is peeled into UF(*VF) iterations of the scalar epilog.
> While keeping even_load_static_tc test case of interleaved-accesses.ll **without** this peeling, when run with "-force-vector-width=1 -force-vector-interleave=4"; unlike the original patch. Suggest to include this test case "run" in the patch.

@ayal - I'm sorry, but I'm having a really hard time understanding you.

To restate, the correctness issue this is fixing is that the "vectorized" (really unrolled) loop in the test case was running more iterations than the original loop.  It did this because different parts of the vectorizer disagreed about whether a scalar epilogue loop was required.  That disagreement is the bug being fixed.  There is no change in peeling policy intended or desired.  This is a fix for a miscompile, nothing more.

@ayal - I don't feel that we are making useful progress on this review.  You seem to have a very specific view of how you want this fixed, and that is not translating well for me.  Instead of continuing to waste both our times, can I ask you to fix the bug yourself?  At the moment, I feel we're both wasting time on this conversation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103700/new/

https://reviews.llvm.org/D103700



More information about the llvm-commits mailing list