[all-commits] [llvm/llvm-project] 129440: [RISCV] Partially move doPeepholeMaskedRVV into RI...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Nov 27 08:33:19 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 129440728ce3e688969ed253a6709a5d50c5e850
      https://github.com/llvm/llvm-project/commit/129440728ce3e688969ed253a6709a5d50c5e850
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-11-27 (Mon, 27 Nov 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVFoldMasks.cpp
    M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

  Log Message:
  -----------
  [RISCV] Partially move doPeepholeMaskedRVV into RISCVFoldMasks (#72441)

This change is motived by a point of confusion on
https://github.com/llvm/llvm-project/pull/71764. I hadn't fully
understood why doPeepholeMaskedRVV needed to be part of the same change.
As indicated in the fixme in this patch, the reason is that
performCombineVMergeAndVOps doesn't know how to deal with the true side
of the merge being a all-ones masked instruction.

This change removes one of two calls to the routine in
RISCVISELDAGToDAG, and adds a clarifying comment on the precondition for
the remaining call. The post-ISEL code is tested by the cases where we
can form a unmasked instruction after folding the vmerge back into true.

I don't really care if we actually land this patch, or leave it roled
into https://github.com/llvm/llvm-project/pull/71764. I'm posting it
mostly to clarify the confusion.




More information about the All-commits mailing list