[PATCH] D133255: [RISCV] Transform VMERGE_VVM_<LMUL>_TU with all ones mask to VADD_VI_<LMUL>_TU.

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 4 23:15:47 PDT 2022


kito-cheng added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2511
   // Check that we're using V0 as a mask register.
   if (!isa<RegisterSDNode>(N->getOperand(MaskOpIdx)) ||
       cast<RegisterSDNode>(N->getOperand(MaskOpIdx))->getReg() != RISCV::V0)
----------------
fakepaper56 wrote:
> Do we have an instruction that mask operand is not `v0`? I am confused by the condition. 
We *might* allow mask hold other than `v0` register in future vector extension, so having this checking should be harmless, and could catch unexpected case in future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133255/new/

https://reviews.llvm.org/D133255



More information about the llvm-commits mailing list