[PATCH] D95039: [SVE] Add support for scalable vectorization of loops with selects and cmps

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 04:07:22 PST 2021


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


================
Comment at: llvm/test/Analysis/CostModel/sve-cmpsel.ll:9
+; Check icmp for a legal integer vector.
+define <vscale x 4 x i1> @cmp_nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {
+; CHECK-LABEL: 'cmp_nxv4i32'
----------------
dmgreen wrote:
> david-arm wrote:
> > Here I've deliberately tried to avoid an explosion of test cases, so for the legal and illegal variants I used different element types.
> Cost model checks don't really need valid inputs, they can just use undef. It makes adding a lot of them much simpler. See something like llvm/test/Analysis/CostModel/ARM/reduce-smax.ll or llvm/test/Analysis/CostModel/X86/arith-fma.ll. Even though they are adding many (sub-) architectures, they are still managable.
Thanks for the suggestion @dmgreen!


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

https://reviews.llvm.org/D95039



More information about the llvm-commits mailing list