[Mlir-commits] [mlir] [mlir] IntegerRangeAnalysis: add support for vector type (PR #112292)

Andrzej Warzyński llvmlistbot at llvm.org
Mon Oct 28 10:30:41 PDT 2024


================
@@ -0,0 +1,57 @@
+// RUN: mlir-opt -int-range-optimizations -canonicalize %s | FileCheck %s
+
+
+// CHECK-LABEL: func @constant_vec
+// CHECK: test.reflect_bounds {smax = 7 : index, smin = 0 : index, umax = 7 : index, umin = 0 : index}
+func.func @constant_vec() -> vector<8xindex> {
+  %0 = arith.constant dense<[0, 1, 2, 3, 4, 5, 6, 7]> : vector<8xindex>
+  %1 = test.reflect_bounds %0 : vector<8xindex>
----------------
banach-space wrote:

Yes, I gathered that much from mlir/test/lib/Dialect/Test/TestOps.td, but it doesn’t quite clarify things for me. The lack of documentation for these operations makes it hard to understand the distinction between `test.reflect_bounds` and `test.with_bounds`. 

Given that @Hardcode84 is already using these ops for testing, it would be fantastic if some of that expertise could be shared through documentation. This would benefit everyone working with these tests!

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


More information about the Mlir-commits mailing list