[all-commits] [llvm/llvm-project] 084f5c: [RISCV] Add tests cases to show missed opportunity...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Nov 15 10:52:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 084f5c26a4ad174bfbe1f6ba28385c6324c13bd1
      https://github.com/llvm/llvm-project/commit/084f5c26a4ad174bfbe1f6ba28385c6324c13bd1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/vfmv.s.f.ll

  Log Message:
  -----------
  [RISCV] Add tests cases to show missed opportunity to turn vfmv.s.f into vmv.s.x when source is FP constant materialized in GPR.

We end up creating the constant in GPR, move to FPR, then move to vector.
We should go directly from GPR to vector.


  Commit: c281a6add55a861a16eabe3bb8b436f63ef8e0cb
      https://github.com/llvm/llvm-project/commit/c281a6add55a861a16eabe3bb8b436f63ef8e0cb
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    M llvm/test/CodeGen/RISCV/rvv/vfmv.s.f.ll

  Log Message:
  -----------
  [RISCV] Add isel pattern for int_riscv_vfmv_s_f with scalar FP constant operand.

Use vmv_s_x instead of the constant will be materialized in a GPR.

This avoids going from GPR to FPR to vector.

We already did this for RISCVISD::VFMV_S_F_VL and probably we should
just turn int_riscv_vfmv_s_f into RISCVISD::VFMV_S_F_VL, but I'd like
to see some improvements to RISCVInsertVSETVLI first.


Compare: https://github.com/llvm/llvm-project/compare/107185fa858e...c281a6add55a


More information about the All-commits mailing list