[Mlir-commits] [mlir] Make the index dialect inlineable. (PR #155290)
Mehdi Amini
llvmlistbot at llvm.org
Tue Aug 26 00:08:25 PDT 2025
================
@@ -0,0 +1,18 @@
+// RUN: mlir-opt %s -inline -split-input-file | FileCheck %s
+
+// -----
+// Indexes should be inlineable
+func.func @func(%arg0 : index) -> index {
+ %1 = index.constant 2
+ return %1 : index
+}
+
+// CHECK-LABEL: @inline_interface
+func.func @inline_interface(%arg0 : index) -> index {
+ // CHECK: index.constant
----------------
joker-eph wrote:
```suggestion
// CHECK: %[[R:.*]] = index.constant
```
Otherwise you're using an undefined variable in the return below.
https://github.com/llvm/llvm-project/pull/155290
More information about the Mlir-commits
mailing list