[all-commits] [llvm/llvm-project] c78798: [SLP]Improve costs of vectorized loads/stores by a...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Thu Oct 13 07:24:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c787986cddce230e8ca28a773166b5773449bcb9
      https://github.com/llvm/llvm-project/commit/c787986cddce230e8ca28a773166b5773449bcb9
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/remark_horcost.ll
    M llvm/test/Transforms/SLPVectorizer/X86/remark_not_all_parts.ll

  Log Message:
  -----------
  [SLP]Improve costs of vectorized loads/stores by analyzing GEPs.

When generating masked gathers nodes, SLP vectorizer accounts the cost
of the GEPs for loads as part of the scalar-vector transformation cost
estimation. But it does not do it for vectorized loads/stores, while it
may completely remove some of the GEPs completely. Because of this in
some cases masked gather operation can be much more profitable rather
than regular vectorization (masked-gather cost + vector GEP - scalar
loads + GEPs comparing to vectorized loads - scalar loads).
Added the analysis of the removed scalarGEPs for vectorized load/store nodes for better cost estimation.

Differential Revision: https://reviews.llvm.org/D135282




More information about the All-commits mailing list