[all-commits] [llvm/llvm-project] a8a36e: [RISCV] Scalarize constant stores of fixed vectors...

Luke Lau via All-commits all-commits at lists.llvm.org
Wed May 24 07:55:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8a36ee5220e1ac74b06f90adab3dec020920e2a
      https://github.com/llvm/llvm-project/commit/a8a36ee5220e1ac74b06f90adab3dec020920e2a
  Author: Luke Lau <luke at igalia.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-store.ll

  Log Message:
  -----------
  [RISCV] Scalarize constant stores of fixed vectors if small enough

For stores of small fixed-length vector constants, we can store them
with a sequence of lui/addi/sh/sw to avoid the cost of building the
vector and the vsetivli toggle, provided the constant materialization
cost isn't too high.

This subsumes the optimisation for stores of zeroes in
4dc9a2c5b93682c12d7a80bbe790b14ddb301877

(This is a reapply of 0ca13f9d2701e23af2d000a5d8f48b33fe0878b7)

Reviewed By: reames

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




More information about the All-commits mailing list