[Mlir-commits] [mlir] [mlir][LLVM] add llvm.fake.use to LLVM dialect (PR #187026)

Stephen Tozer llvmlistbot at llvm.org
Wed Mar 18 08:04:39 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)
----------------
SLTozer wrote:

Off the top of my head, I don't think it is required - none of the optimizations that use `notail` can be applied to `llvm.fake.use`. Since there's also no documentation stating such, assume it's fine to skip it (and if there turns out to be a problem then we can document it for future reference).

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


More information about the Mlir-commits mailing list