[all-commits] [llvm/llvm-project] 4a539e: [RISCV] Add test cases for storing small constant ...

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


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

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-store.ll

  Log Message:
  -----------
  [RISCV] Add test cases for storing small constant vectors

Reviewed By: craig.topper

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


  Commit: 0ca13f9d2701e23af2d000a5d8f48b33fe0878b7
      https://github.com/llvm/llvm-project/commit/0ca13f9d2701e23af2d000a5d8f48b33fe0878b7
  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 up to 32 bits

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.

Note that this only handles vectors that are 32 bits or smaller, but
could be expanded to 64 bits if we know that the constant
materialization cost isn't too high.

Reviewed By: reames

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


Compare: https://github.com/llvm/llvm-project/compare/04609b09e990...0ca13f9d2701


More information about the All-commits mailing list