[PATCH] D155928: [RISCV] Add patterns for vnsrl.vx where shift amount is truncated

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 13:28:08 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:3025
+    selectVLOp(N->getOperand(2), VL);
+    return N->getOperand(1).getOpcode() == RISCVISD::VMSET_VL &&
+           isa<ConstantSDNode>(VL) &&
----------------
luke wrote:
> I thought we would need to check the VL of this VMSET_VL here, but the `true_mask` pattern used in other tablegen patterns doesn't seem to:
> 
> ```
> def true_mask : PatLeaf<(riscv_vmset_vl (XLenVT srcvalue))>;
> ```
> 
> Any idea as to why that is?
I don't remember if it was because it was hard to do in tablegen or just that didn't matter because the bits past VL are undefined.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155928



More information about the llvm-commits mailing list