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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 06:17:23 PST 2021


dmgreen 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'
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95039



More information about the llvm-commits mailing list