[Mlir-commits] [mlir] [mlir][LLVM] add llvm.fake.use to LLVM dialect (PR #187026)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 17 06:56:09 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:
Note that clang is giving the `notail` attribute to ` call void (...) @llvm.fake.use`.
I do not think there is currently a way to add call attributes to the LLVM dialect intrinsic call.
Adding notail does not look like a requirement of the LLVM IR. So the current patch is enough for me currently, but I wonder what is you take on the topic.
Would it be OK for the intrinsic operation to have an notail unit attribute that lowers into an LLVM notail call attribute, or should LLVM dialect intrinsics be given a way to carry call attributes in general?
https://github.com/llvm/llvm-project/pull/187026
More information about the Mlir-commits
mailing list