[llvm-bugs] [Bug 45679] New: LoopVectorizer produces wrong code with UserVF not dividing small TripCount
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Apr 26 09:27:58 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45679
Bug ID: 45679
Summary: LoopVectorizer produces wrong code with UserVF not
dividing small TripCount
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: ayal.zaks at intel.com
CC: dorit.nuzman at intel.com, florian_hahn at apple.com,
gil.rapaport at intel.com, llvm-bugs at lists.llvm.org
Created attachment 23402
--> https://bugs.llvm.org/attachment.cgi?id=23402&action=edit
Reproducer
Compiling the attached with
opt -loop-vectorize -force-vector-width=4 -S
vectorizes a loop with trip-count=14 using VF=4 w/o a tail, explaining that:
LV: Found trip count: 14
LV: Not allowing scalar epilogue due to low trip count.
LV: Performing code size checks.
LV: The Smallest and Widest types: 32 / 32 bits.
LV: The Widest register safe to use is: 32 bits.
LV: No tail will remain for any chosen VF. <== but LV doesn't get to chose VF
LV: Using user VF 4.
Culprit is computeMaxVF() who checks if TC % MaxVF == 0 where MaxVF =
computeFeasibleMaxVF(TC) (=1 in this case), even if a UserVF is given and
ultimately used.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200426/30773211/attachment.html>
More information about the llvm-bugs
mailing list