[PATCH] D153507: [SLP] Use vector types for cmp alt instructions costs

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 10:21:06 PDT 2023


dmgreen added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/extracts-from-scalarizable-vector.ll:2
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
 ; RUN: opt -S -passes=slp-vectorizer -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s
 
----------------
vporpo wrote:
> dmgreen wrote:
> > vporpo wrote:
> > > Perhaps set the -slp-threshold such that it gets vectorized?
> > The idea is that these shouldn't be vectorized. The degenerate case would get simplified by instsimplify to ret 0, so is not interesting. The with_inputs case doesn't gain anything from vectorization (the f128 fcmp's will just be scalarized, so the vectorized version has are twice as many fcmp, plus extra shuffles and the reduce).
> I understand that this can be simplified, but isn't this test checking that SLP matches and generates the `llvm.vector.reduce.and` pattern? Or is there a separate test for that? 
According to https://reviews.llvm.org/rG403bd583a8cc1f041430ff1b236ab296a2acdc85 it was just added to protect against a crash. I left this version of the test as-is to make sure it remains valid.


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

https://reviews.llvm.org/D153507



More information about the llvm-commits mailing list