[llvm-branch-commits] [llvm] Add IR and codegen support for deactivation symbols. (PR #133536)

Florian Mayer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 24 19:08:50 PST 2025


================
@@ -1221,15 +1225,23 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
     }
   }
 
-  if (SDNode *GluedNode = Node->getGluedNode()) {
-    // FIXME: Possibly iterate over multiple glue nodes?
-    if (GluedNode->getOpcode() ==
-        ~(unsigned)TargetOpcode::CONVERGENCECTRL_GLUE) {
-      Register VReg = getVR(GluedNode->getOperand(0), VRBaseMap);
-      MachineOperand MO = MachineOperand::CreateReg(VReg, /*isDef=*/false,
-                                                    /*isImp=*/true);
-      MIB->addOperand(MO);
-    }
+  unsigned Op = Node->getNumOperands();
+  if (Op != 0 && Node->getOperand(Op - 1)->getOpcode() ==
+                     ~(unsigned)TargetOpcode::CONVERGENCECTRL_GLUE) {
+    Register VReg = getVR(Node->getOperand(Op - 1)->getOperand(0), VRBaseMap);
+    MachineOperand MO = MachineOperand::CreateReg(VReg, /*isDef=*/false,
+                                                  /*isImp=*/true);
+    MIB->addOperand(MO);
+    Op--;
+  }
+
+  if (Op != 0 &&
----------------
fmayer wrote:

is it not possible that we have `CONVERGENCECTRL_GLUE` and `DEACTIVATION_SYMBOL` attached to the same node? if not, please comment why this is ok

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


More information about the llvm-branch-commits mailing list