[PATCH] D102253: [LV] Prevent vectorization with unsupported element types.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 1 07:31:34 PDT 2021


david-arm accepted this revision.
david-arm added a comment.

LGTM! Thanks for making all the changes @kmclaughlin. Can you address the nits before merging?



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1528
+  /// scalable vectorization factor MaxVF. If the loop is illegal the function
+  /// returns an appropriate error remark in Msg.
+  bool canWidenLoopWithScalableVectors(ElementCount MaxVF) const;
----------------
nit: I think the comment probably needs updating now since we no longer return a remark. Maybe something like:

  /// scalable vectorization factor MaxVF. If the loop is illegal the function
  /// emits an appropriate error remark.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll:13
+; CHECK-NEXT: add nsw i128 {{.*}}, 42
+; CHECK-NEXT: store i128 %4, i128* {{.*}}
+; CHECK-NEXT: store i128 %5, i128* {{.*}}
----------------
nit: Maybe best not to rely upon `%4` and `%5` here perhaps and use a named variable?


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll:40
+; CHECK-NEXT: fsub fp128 {{.*}}, 0xL00000000000000008000000000000000
+; CHECK-NEXT: store fp128 %4, fp128* {{.*}}
+; CHECK-NEXT: store fp128 %5, fp128* {{.*}}
----------------
nit: Same thing as above about using `%4` and `%5`


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

https://reviews.llvm.org/D102253



More information about the llvm-commits mailing list