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

Krzysztof Drewniak llvmlistbot at llvm.org
Wed Oct 23 08:24:43 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>
----------------
krzysz00 wrote:

These test ops are from existing integer range inference tests - they have an implement of the integer range inference interface that sets attributes on `reflect_bounds` to match the bounds of the input

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


More information about the Mlir-commits mailing list