[all-commits] [llvm/llvm-project] b71d88: [RISCV] Constrain passthru regclass in vmerge -> v...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Sep 9 22:26:40 PDT 2024


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

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
    M llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-to-vmv.mir

  Log Message:
  -----------
  [RISCV] Constrain passthru regclass in vmerge -> vmv peephole

In #107827 we now set true's passthru to the false operand if it was
undef. We need to remember to also constrain the regclass in case true
is a masked pseudo which needs its passthrus to be in VR[M*]NoV0


  Commit: 7ba6768df8181bc270763333969d4a1d6cc2e160
      https://github.com/llvm/llvm-project/commit/7ba6768df8181bc270763333969d4a1d6cc2e160
  Author: Luke Lau <luke at igalia.com>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
    A llvm/test/CodeGen/RISCV/rvv/pr107950.ll

  Log Message:
  -----------
  Revert "[RISCV] Update V0Defs after moving Src in peepholes (#107359)"

This fixes #107950 and adds a test case for it. The issue was due to
us incorrectly assuming that we stored a V0Defs entry for every single
instruction.

We actually only store them for instructions that use V0, so when we
updated the V0Def after moving we sometimes ended up copying nullptr
over from an instruction that doesn't use V0 and clearing the V0Def
entry inadvertently.

Because we don't have V0Defs on instructions that don't use V0, the
FIXME was never actually needed in the first place since the
bookkeeping wasn't out of sync to begin with.

That commit also mentioned that a future unmasked to masked pseudo
peephole might need unmasked pseudos to have V0Defs entries, but after
working on this locally it turns out we don't.

This reverts commit ce3648094d44e8c098396a353b215acecb363cda.


Compare: https://github.com/llvm/llvm-project/compare/9b67c99dc5b0...7ba6768df818

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