[Mlir-commits] [mlir] [mlir][LLVM] add llvm.fake.use to LLVM dialect (PR #187026)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 18 08:02:53 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)
----------------
jeanPerier wrote:
Thanks for the review. As far as I can see it is not added when exporting to LLVM, so LLVM intrinsic builder is not adding it. I do not need it in MLIR, and for my use case at O0 I think it may be fine to not emit it in the LLVM IR.
@SLTozer, is the `notail` attribute mandatory on calls to llvm.fake.use?
https://github.com/llvm/llvm-project/pull/187026
More information about the Mlir-commits
mailing list