[llvm] [LLVM][Tablegen] Add Default arguments support for Intrinsics in TableGen (PR #198557)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 15:54:28 PDT 2026


================
@@ -0,0 +1,108 @@
+; Verify that AutoUpgrade fills in missing trailing arguments of intrinsic
+; calls from the default values declared via DefaultValue in TableGen.
+;
+; RUN: rm -rf %t && split-file %s %t
+; RUN: opt -S < %t/single-val.ll          | FileCheck %t/single-val.ll
+; RUN: opt -S < %t/explicit-preserved.ll  | FileCheck %t/explicit-preserved.ll
+; RUN: opt -S < %t/multiple-trailing.ll    | FileCheck %t/multiple-trailing.ll
+; RUN: opt -S < %t/partial-fill.ll         | FileCheck %t/partial-fill.ll
+; RUN: opt -S < %t/nanosleep.ll            | FileCheck %t/nanosleep.ll
+; RUN: opt -S < %t/cp-async-bulk.ll        | FileCheck %t/cp-async-bulk.ll
+; RUN: opt -S < %t/move-i32.ll             | FileCheck %t/move-i32.ll
+; RUN: opt -S < %t/tcgen05-fence.ll        | FileCheck %t/tcgen05-fence.ll
+
+;--- single-val.ll
+; A single missing trailing argument is filled with its default (255).
+declare i32 @llvm.nvvm.test.add3(i32, i32, i32)
----------------
mshockwave wrote:

we no longer need to declare intrinsics

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


More information about the llvm-commits mailing list