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: unassignedb...@nondot.org
Reporter: ayal.z...@intel.com
CC: dorit.nuz...@intel.com, florian_h...@apple.com,
gil.rapap...@intel.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs