[llvm] [TableGen, CodeGen, CHERI] Add support for the cPTR wildcard value type. (PR #158426)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 21 20:18:30 PDT 2025


================
@@ -1647,9 +1654,11 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode &N,
   case SDTCisVT:
     // Operand must be a particular type.
     return NodeToApply.UpdateNodeType(ResNo, VVT, TP);
-  case SDTCisPtrTy:
-    // Operand must be same as target pointer type.
-    return NodeToApply.UpdateNodeType(ResNo, MVT::iPTR, TP);
+  case SDTCisPtrTy: {
+    // Operand must be a legal pointer (iPTR, or possibly cPTR) type.
+    const auto &PtrTys = TP.getDAGPatterns().getLegalPtrTypes();
----------------
arsenm wrote:

No auto 

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


More information about the llvm-commits mailing list