[all-commits] [llvm/llvm-project] 77fc8d: [RISCV] Rematerialize vmv.v.x (#107993)

Luke Lau via All-commits all-commits at lists.llvm.org
Tue Sep 10 18:13:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77fc8dae22ff1fa38c0271abc5521db76351f1fd
      https://github.com/llvm/llvm-project/commit/77fc8dae22ff1fa38c0271abc5521db76351f1fd
  Author: Luke Lau <luke at igalia.com>
  Date:   2024-09-11 (Wed, 11 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
    M llvm/test/CodeGen/RISCV/rvv/ctpop-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/cttz-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/remat.ll

  Log Message:
  -----------
  [RISCV] Rematerialize vmv.v.x (#107993)

Even though vmv.v.x has a non constant scalar operand, we can still
rematerialize it because we have split register allocation between
vectors and scalars.

InlineSpiller will check to make sure that the scalar operand is live at
the point where the rematerialization occurs, so this won't extend any
scalar live ranges. However this also means we may not be able to
rematerialize in some cases, as shown in @vmv.v.x_needs_extended.

It might be worthwhile teaching InlineSpiller to extend scalar live
ranges in a future patch. I experimented with this locally and it
reduced spills on 531.deepsjeng_r by a further 3%.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list