[PATCH] D80682: [NFC][SLP] Add test case exposing SLP cost model bug.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 05:57:24 PDT 2020


spatel added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/slp_vec_list_bias.ll:1
+; RUN: opt < %s -slp-vectorizer -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake -tti -S | FileCheck %s
+
----------------
Does "-tti" change the behavior?


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/slp_vec_list_bias.ll:8
+; building vectorizable tree from only a portion of it.
+; FIXME: this is unprofitable to vectorize.
+; CHECK:  insertelement <4 x i32>
----------------
As suggested, if you auto-generate the CHECK lines using utils/update_test_checks.py, the test will show the full results. Warning - you should probably do something like "s/tmp/t/" to avoid problems with the script (see D80584).

It would also be nice to add a comment about the x86-specific asm that we want to avoid here ("vpaddd" or similar). There are later transforms in -vector-combine and DAGCombiner that could scalarize and solve this, but if we can fix the problem within SLP, then that's obviously better.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80682





More information about the llvm-commits mailing list