[PATCH] D132923: [RISCV] Support peephole optimization to fold vmerge.vvm that has tail agnostic policy and unmasked intrinsics.

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 07:17:16 PDT 2022


fakepaper56 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2715
     SmallVector<SDValue, 8> Ops;
-    Ops.push_back(Merge);
+    if (RISCVII::hasVecPolicyOp(TII->get(MaskedOpc).TSFlags)) 
+      Ops.push_back(False);
----------------
jacquesguan wrote:
> fakepaper56 wrote:
> > Why you test vector policy of `MaskedOpc` here?
> Thanks, it's a mistake, I am intended to check whether `MaskedOpc` has mergeop here. Fixed now.
I think we should have merge operand and vector policy operand to make sure the result is same as the original VMERGE_TU nodes. I am sorry that I ignore it. I open a new revision D133302 to refine the code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132923



More information about the llvm-commits mailing list