[llvm] [RISCV] Implement EmitTargetCodeForMemset for Xqcilsm (PR #151555)

Sudharsan Veeravalli via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 20:56:43 PDT 2025


================
@@ -1845,6 +1845,15 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
     CurDAG->RemoveDeadNode(Node);
     return;
   }
+  case RISCVISD::QC_SETWMI: {
+    SDValue Chain = Node->getOperand(0);
+    SDVTList VTs = Node->getVTList();
+    SDValue Ops[] = {Node->getOperand(1), Node->getOperand(2),
+                     Node->getOperand(3), Node->getOperand(4), Chain};
+    MachineSDNode *New = CurDAG->getMachineNode(RISCV::QC_SETWMI, DL, VTs, Ops);
+    ReplaceNode(Node, New);
----------------
svs-quic wrote:

I'm figuring this out. Just copying the memoperand here leads to a crash. 

> But its not clear to me why we can't use isel pattern for this which would handle that using SDNPMemOperand

Is there an example of something similar for a `RISCVISD::` node?

https://github.com/llvm/llvm-project/pull/151555


More information about the llvm-commits mailing list