[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

David Sherwood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 05:16:33 PDT 2020


david-arm marked an inline comment as done.
david-arm added inline comments.


================
Comment at: clang/lib/Sema/SemaStmtAttr.cpp:144
+      assert(ValueExpr && "Attribute must have a valid value expression.");
+      if (S.CheckLoopHintExpr(ValueExpr, St->getBeginLoc()))
+        return nullptr;
----------------
fhahn wrote:
> Is there a way to only accept `fixed_width/scalable` for targets that support it? Not sure if we have enough information here, but we might be able to reject it eg per target basis or something
Hi @fhahn, I think if possible we'd prefer not to reject scalable vectors at this point. Theoretically there is no reason why we can't perform scalable vectorisation for targets that don't have hardware support for scalable vectors. In this case it simply means that vscale is 1. If you want we could add some kind of opt-remark in the vectoriser that says something like "target does not support scalable vectors, vectorising for vscale=1"?


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

https://reviews.llvm.org/D89031



More information about the cfe-commits mailing list