[llvm] [LLVM][Tablegen] Add Default arguments support for Intrinsics in TableGen (PR #198557)
Varad Rahul Kamthe via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 06:35:48 PDT 2026
================
@@ -130,9 +130,24 @@ class Returned<ArgIndex idx> : IntrinsicProperty {
int ArgNo = idx.Value;
}
-// ImmArg - The specified argument must be an immediate.
-class ImmArg<ArgIndex idx> : IntrinsicProperty {
+// DefaultVal - A value carrier paired with ImmArg to declare a default for
+// a missing trailing argument. AutoUpgrade fills the default when an old
+// .bc / .ll file is loaded.
+class DefaultVal<int val> {
+ bit HasDefault = 1;
+ int Value = val;
----------------
varadk27 wrote:
Updated in the latest revision. Thanks!
https://github.com/llvm/llvm-project/pull/198557
More information about the llvm-commits
mailing list