[all-commits] [llvm/llvm-project] 596640: [RISCV] Fold vmv.v.v into vmerge (#151341)

Luke Lau via All-commits all-commits at lists.llvm.org
Wed Jul 30 19:15:33 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 596640a245e3ba05c3fe42745984fb4bb921ad75
      https://github.com/llvm/llvm-project/commit/596640a245e3ba05c3fe42745984fb4bb921ad75
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-07-31 (Thu, 31 Jul 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector.ll
    M llvm/test/CodeGen/RISCV/rvv/vmv.v.v-peephole.ll
    M llvm/test/CodeGen/RISCV/rvv/vmv.v.v-peephole.mir

  Log Message:
  -----------
  [RISCV] Fold vmv.v.v into vmerge (#151341)

We support folding vmv.v.v into its source via the foldVMV_V_V peephole,
but currently it requires that the source has a policy operand.

PseudoVMERGEs (as well as add-with-carry/subtract-with-borrow pseudos)
don't have a policy operand, and instead just seem to derive TA/TU from
whether or not the passthru is undef, since the mask policy doesn't
affect them.

This patch allows pseudos without policy operands, given that if there's
no policy operand then it will default to TU when the passthru is
undefined which should be conservatively correct.

I previously tried adding a policy operand to vmerge/vadc etc., but this
ended up being a lot of churn.

This removes a bunch of redundant vmv.v.vs that I noticed with EVL tail
folding on llvm-test-suite.



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