[Mlir-commits] [mlir] [mlir][LLVM] add llvm.fake.use to LLVM dialect (PR #187026)
Tobias Gysi
llvmlistbot at llvm.org
Tue Mar 17 08:50:15 PDT 2026
================
@@ -724,6 +724,19 @@ define void @va_intrinsics_test(ptr %0, ptr %1, ...) {
ret void
}
+; CHECK-LABEL: @fake_use
+; CHECK-SAME: %[[VAL:[a-zA-Z0-9]+]]
+; CHECK-SAME: %[[PTR:[a-zA-Z0-9]+]]
+define void @fake_use(i32 %0, ptr %1) {
+ ; CHECK: llvm.intr.fake.use %[[VAL]] : i32
+ call void (...) @llvm.fake.use(i32 %0)
----------------
gysit wrote:
It is true that the explicit intrinsics sometimes don't import all the call attributes (at least there is now a way to import the argument and result attributes). In case of the `notail` attribute I wonder if it is not recreated when exporting back to LLVM proper? We call LLVM's intrinsic builder and I would expect it will annotate attributes that are intrinsic specific (or are you worried about querying this information in MLIR?).
https://github.com/llvm/llvm-project/pull/187026
More information about the Mlir-commits
mailing list