[PATCH] D96023: [LoopVectorize] Calculate Max Feasible Scalable VF.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 09:37:45 PST 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:81
   case HK_FORCE:
+  case HK_SCALABLE:
     return (Val <= 1);
----------------
sdesmalen wrote:
> david-arm wrote:
> > Not a problem really, but just wondering why you moved it here? I thought since Val is unsigned the two different checks are identical?
> That's because Val can now also be -1 (<=> `FK_Undefined`), used for `-scalable-vectorization=on`.
Sorry, when I replied I didn't realise Val was indeed `unsigned`, you're right that the result is the same. I thought I'd move it here to make it more clear that both Force and Scalable work the same way (as in, they take FK_Disabled, FK_Undefined or FK_Enabled). But yes, the change is a non-functional one.

I guess this means you can set it to 'disabled' or 'enabled', but not explicitly to 'auto' using the hints.


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

https://reviews.llvm.org/D96023



More information about the llvm-commits mailing list