[PATCH] D114075: [IR] Split vscale_range interface

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 09:36:04 PST 2021


c-rhodes marked 3 inline comments as done.
c-rhodes added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5655-5656
+    Attribute Attr = TheFunction->getFnAttribute(Attribute::VScaleRange);
+    if (Optional<unsigned> VScaleMax = Attr.getVScaleRangeMax())
+      MaxVScale = VScaleMax.getValue();
   }
----------------
paulwalker-arm wrote:
> Is this if statement required? MaxVScale is an optional so I think `MaxVScale = Attr.getVScaleRangeMax();` just works?
> Is this if statement required? MaxVScale is an optional so I think `MaxVScale = Attr.getVScaleRangeMax();` just works?

I wondered that, you're right it works.


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

https://reviews.llvm.org/D114075



More information about the llvm-commits mailing list