[all-commits] [llvm/llvm-project] 0f20b9: [RISCV] Don't require mask or VL to be the same in...

Luke Lau via All-commits all-commits at lists.llvm.org
Tue Apr 9 01:04:32 PDT 2024


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

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/vwadd-vp.ll

  Log Message:
  -----------
  [RISCV] Don't require mask or VL to be the same in combineBinOp_VLToVWBinOp_VL (#87997)

In NodeExtensionHelper we keep track of the VL and mask of the operand
being extended and check that they are the same as the root node's.
However for the nodes that we support, none of them have a passthru
operand with the exception of RISCV::VMV_V_X_VL, but we check that it's
passthru is undef anyway.

So it's safe to just discard the extend node's VL and mask and just use
the root's instead. (This is the same type of reasoning we use to treat
any vmset_vl as an all ones mask)

This allows us to match some more cases where we mix VP/non-VP/VL nodes,
but these don't seem to appear in practice. The main benefit from this
would be to simplify the code.



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