[PATCH] D91518: [LV][NFC-ish] Allow vector widths over 256 elements

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 00:44:05 PST 2020


simoll updated this revision to Diff 306330.
simoll edited the summary of this revision.
simoll added a comment.

Followed @fhahn 's suggestion to test against the widest vector register width instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91518

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp


Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5349,8 +5349,9 @@
   LLVM_DEBUG(dbgs() << "LV: The Widest register safe to use is: "
                     << WidestRegister << " bits.\n");
 
-  assert(MaxVectorSize <= 256 && "Did not expect to pack so many elements"
-                                 " into one vector!");
+  assert(MaxVectorSize <= WidestRegister &&
+         "Did not expect to pack so many elements"
+         " into one vector!");
   if (MaxVectorSize == 0) {
     LLVM_DEBUG(dbgs() << "LV: The target has no vector registers.\n");
     MaxVectorSize = 1;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91518.306330.patch
Type: text/x-patch
Size: 759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201119/3dd92f0f/attachment.bin>


More information about the llvm-commits mailing list