[all-commits] [llvm/llvm-project] 928564: [RISCV] Combine a gather to a larger element type ...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Sep 18 16:55:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 928564caa5de8b07cede51e45499934777b9938c
      https://github.com/llvm/llvm-project/commit/928564caa5de8b07cede51e45499934777b9938c
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-masked-gather.ll

  Log Message:
  -----------
  [RISCV] Combine a gather to a larger element type (#66694)

If we have a gather load whose indices correspond to valid offsets for a
gather with element type twice that our source, we can reduce the number
of indices and perform the operation at the larger element type.

This is generally profitable since we half VL - and these operations are
linear in VL. This may require some additional VL/VTYPE toggles, but
this appears to be worthwhile on the whole.




More information about the All-commits mailing list