[PATCH] D140789: [SLP] Unify GEP cost modeling for load, store and GEP nodes.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 09:14:18 PST 2023


vdmitrie added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/geps-non-pow-2.ll:2
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -passes=slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=haswell < %s | FileCheck %s
+; RUN: opt -passes=slp-vectorizer -S -o - -mtriple=x86_64-unknown-linux -mcpu=haswell -slp-threshold=-3 < %s | FileCheck %s
 @e = dso_local local_unnamed_addr global i32 0, align 4
----------------
RKSimon wrote:
> Havig to add a slp-threshold on an existing defaut test makes me a little nervous tbh
I believe that the purpose of this test is to show how vectorization goes without/with non-pow2 feature support (even though the feature is not ready yet). So we need to keep it vectorized.  This is why I changed threshold instead of re-generating checks. We already have some tests that explicitly set the threshold for similar reason as reduced tests are not always run as desired with default threshold.
In this particular case the behavior has changed because the unified GEP cost routine adds an ADD cost for only those GEPs that used once while previously it did that unconditionally.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140789



More information about the llvm-commits mailing list