[Mlir-commits] [mlir] [mlir][vector] add result type to vector.extract assembly format (PR #66499)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Sep 15 05:16:47 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-linalg
            
<details>
<summary>Changes</summary>
The vector.extract assembly format currently only contains the source type, for example:

  %1 = vector.extract %0[1] : vector<3x7x8xf32>

it's not immediately obvious if this is the source or result type. This patch improves the assembly format to make this clearer, so the above becomes:

  %1 = vector.extract %0[1] : vector<7x8xf32> from vector<3x7x8xf32>
--

Patch is 292.08 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/66499.diff

51 Files Affected:

- (modified) mlir/docs/Dialects/Vector.md (+2-2) 
- (modified) mlir/include/mlir/Dialect/Vector/IR/VectorOps.td (+7-5) 
- (modified) mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp (+3-3) 
- (modified) mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (+1-1) 
- (modified) mlir/lib/Dialect/Vector/IR/VectorOps.cpp (+2-2) 
- (modified) mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp (+2-2) 
- (modified) mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp (+1-1) 
- (modified) mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp (+3-3) 
- (modified) mlir/test/Conversion/MathToFuncs/fpowi.mlir (+12-12) 
- (modified) mlir/test/Conversion/MathToFuncs/ipowi.mlir (+12-12) 
- (modified) mlir/test/Conversion/MathToLibm/convert-to-libm.mlir (+32-32) 
- (modified) mlir/test/Conversion/VectorToGPU/vector-to-mma-ops-mma-sync.mlir (+10-10) 
- (modified) mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir (+5-5) 
- (modified) mlir/test/Conversion/VectorToSCF/unrolled-tensor-transfer-ops.mlir (+2-2) 
- (modified) mlir/test/Conversion/VectorToSCF/unrolled-vector-to-loops.mlir (+6-6) 
- (modified) mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir (+6-6) 
- (modified) mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir (+1-1) 
- (modified) mlir/test/Dialect/Arith/emulate-wide-int-very-wide.mlir (+4-4) 
- (modified) mlir/test/Dialect/Arith/emulate-wide-int.mlir (+70-70) 
- (modified) mlir/test/Dialect/Arith/int-narrowing.mlir (+4-4) 
- (modified) mlir/test/Dialect/Arith/test-emulate-wide-int-pass.mlir (+4-4) 
- (modified) mlir/test/Dialect/Linalg/transform-op-matmul-to-outerproduct.mlir (+6-6) 
- (modified) mlir/test/Dialect/Linalg/vectorize-convolution.mlir (+21-21) 
- (modified) mlir/test/Dialect/Math/canonicalize_ipowi.mlir (+1-1) 
- (modified) mlir/test/Dialect/NVGPU/transform-matmul-to-nvvm.mlir (+5-5) 
- (modified) mlir/test/Dialect/Vector/canonicalize.mlir (+93-93) 
- (modified) mlir/test/Dialect/Vector/constant-fold.mlir (+1-1) 
- (modified) mlir/test/Dialect/Vector/invalid.mlir (+6-6) 
- (modified) mlir/test/Dialect/Vector/ops.mlir (+10-10) 
- (modified) mlir/test/Dialect/Vector/scalar-vector-transfer-to-memref.mlir (+5-5) 
- (modified) mlir/test/Dialect/Vector/transform-vector.mlir (+1-1) 
- (modified) mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir (+10-10) 
- (modified) mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir (+24-24) 
- (modified) mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir (+27-27) 
- (modified) mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir (+6-6) 
- (modified) mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir (+34-34) 
- (modified) mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir (+8-8) 
- (modified) mlir/test/Dialect/Vector/vector-dropleadunitdim-transforms.mlir (+46-46) 
- (modified) mlir/test/Dialect/Vector/vector-extract-strided-slice-lowering.mlir (+4-4) 
- (modified) mlir/test/Dialect/Vector/vector-gather-lowering.mlir (+16-16) 
- (modified) mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir (+35-35) 
- (modified) mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir (+44-44) 
- (modified) mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir (+12-12) 
- (modified) mlir/test/Dialect/Vector/vector-scan-transforms.mlir (+2-2) 
- (modified) mlir/test/Dialect/Vector/vector-shape-cast-lowering-scalable-vectors.mlir (+25-25) 
- (modified) mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir (+21-21) 
- (modified) mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir (+1-1) 
- (modified) mlir/test/Dialect/Vector/vector-transforms.mlir (+6-6) 
- (modified) mlir/test/Dialect/Vector/vector-transpose-lowering.mlir (+23-23) 
- (modified) mlir/test/Dialect/Vector/vector-warp-distribute.mlir (+12-12) 
- (modified) mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir (+1-1) 


<pre>
diff --git a/mlir/docs/Dialects/Vector.md b/mlir/docs/Dialects/Vector.md
index 2ebdc226ebb5510..a907d59566366bb 100644
--- a/mlir/docs/Dialects/Vector.md
+++ b/mlir/docs/Dialects/Vector.md
@@ -105,8 +105,8 @@ Some existing Arith and Vector Dialect on `n-D` `vector` types comprise:
 // Produces a vector&lt;3x7x8xf32&gt;
 %c = vector.splat %1 : vector&lt;3x7x8xf32&gt;
 
-%d = vector.extract %0[1]: vector&lt;3x7x8xf32&gt;     // -&gt; vector&lt;7x8xf32&gt;
-%e = vector.extract %0[1, 5]: vector&lt;3x7x8xf32&gt;  // -&gt; vector&lt;8xf32&gt;
+%d = vector.extract %0[1]: vector&lt;7x8xf32&gt; from vector&lt;3x7x8xf32&gt;
+%e = vector.extract %0[1, 5]: vector&lt;8xf32&gt; from vector&lt;3x7x8xf32&gt;
 %f = vector.outerproduct %0, %1: vector&lt;4xf32&gt;, vector&lt;8xf32&gt;      // -&gt; vector&lt;4x8xf32&gt;
 %g = vector.outerproduct %0, %1, %2: vector&lt;4xf32&gt;, vector&lt;8xf32&gt;  // fma when adding %2
 
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index 28b5864914f6920..3e2bf1192e1a5e5 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -576,7 +576,7 @@ def Vector_ExtractOp :
                  TCresVTEtIsSameAsOpBase&lt;0, 0&gt;&gt;,
      InferTypeOpAdaptorWithIsCompatible]&gt;,
     Arguments&lt;(ins AnyVectorOfAnyRank:$vector, DenseI64ArrayAttr:$position)&gt;,
-    Results&lt;(outs AnyType)&gt; {
+    Results&lt;(outs AnyType:$result)&gt; {
   let summary = &quot;extract operation&quot;;
   let description = [{
     Takes an n-D vector and a k-D position and extracts the (n-k)-D vector at
@@ -585,9 +585,9 @@ def Vector_ExtractOp :
     Example:
 
     ```mlir
-    %1 = vector.extract %0[3]: vector&lt;4x8x16xf32&gt;
-    %2 = vector.extract %0[3, 3, 3]: vector&lt;4x8x16xf32&gt;
-    %3 = vector.extract %1[]: vector&lt;f32&gt;
+    %1 = vector.extract %0[3]: vector&lt;8x16xf32&gt; from vector&lt;4x8x16xf32&gt;
+    %2 = vector.extract %0[3, 3, 3]: f32 from vector&lt;4x8x16xf32&gt;
+    %3 = vector.extract %1[]: vector&lt;f32&gt; from vector&lt;f32&gt;
     ```
   }];
   let builders = [
@@ -600,7 +600,9 @@ def Vector_ExtractOp :
       return ::llvm::cast&lt;VectorType&gt;(getVector().getType());
     }
   }];
-  let assemblyFormat = &quot;$vector `` $position attr-dict `:` type($vector)&quot;;
+  let assemblyFormat =
+    &quot;$vector `` $position attr-dict `:` type($result) `from` type($vector)&quot;;
+
   let hasCanonicalizer = 1;
   let hasFolder = 1;
   let hasVerifier = 1;
diff --git a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
index 1aeed4594f94505..1456d098e2b814a 100644
--- a/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
+++ b/mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
@@ -1154,12 +1154,12 @@ struct UnrollTransferReadConversion
 /// ```
 /// is rewritten to IR such as (simplified):
 /// ```
-/// %v0 = vector.extract %vec[0] : vector&lt;5x4xf32&gt;
+/// %v0 = vector.extract %vec[0] : vector&lt;4xf32&gt; from vector&lt;5x4xf32&gt;
 /// vector.transfer_write %v0, %A[%a, %b, %c] : vector&lt;4xf32&gt;, memref&lt;...&gt;
-/// %v1 = vector.extract %vec[1] : vector&lt;5x4xf32&gt;
+/// %v1 = vector.extract %vec[1] : vector&lt;4xf32&gt; from vector&lt;5x4xf32&gt;
 /// vector.transfer_write %v1, %A[%a, %b + 1, %c] : vector&lt;4xf32&gt;, memref&lt;...&gt;
 /// ...
-/// %v4 = vector.extract %vec[4] : vector&lt;5x4xf32&gt;
+/// %v4 = vector.extract %vec[4] : vector&lt;4xf32&gt; from vector&lt;5x4xf32&gt;
 /// vector.transfer_write %v4, %A[%a, %b + 4, %c] : vector&lt;4xf32&gt;, memref&lt;...&gt;
 /// ```
 ///
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index f873bd0e0b68e43..e1bc6da408fcb55 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -1615,7 +1615,7 @@ vectorizeScalableVectorPrecondition(Operation *op,
 
   // Only element-wise ops supported in the presence of scalable dims.
   auto linalgOp = dyn_cast&lt;LinalgOp&gt;(op);
-  return success(linalgOp &amp;&amp; isElementwise(linalgOp));
+  return success(linalgOp);
 }
 
 LogicalResult mlir::linalg::vectorizeOpPrecondition(
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index a8ad05f7bc1cabf..86af641ba96dcd3 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -1286,9 +1286,9 @@ class ExtractFromInsertTransposeChainState {
   /// ```
   /// %ins = vector.insert %source, %vest[1]: vector&lt;3x4&gt; into vector&lt;2x3x4x5&gt;
   /// // extractPosition == [1, 2, 3]
-  /// %ext = vector.extract %ins[1, 0]: vector&lt;3x4x5&gt;
+  /// %ext = vector.extract %ins[1, 0]: vector&lt;5&gt; from vector&lt;3x4x5&gt;
   /// // can fold to vector.extract %source[0, 3]
-  /// %ext = vector.extract %source[3]: vector&lt;5x6&gt;
+  /// %ext = vector.extract %source[3]: vector&lt;6&gt; from vector&lt;5x6&gt;
   /// ```
   /// To traverse through %source, we need to set the leading dims to 0 and
   /// drop the extra leading dims.
diff --git a/mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp b/mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp
index d6ea9931095e1c9..85c4c03d383f71c 100644
--- a/mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp
@@ -216,9 +216,9 @@ class ShapeCastOpRewritePattern : public OpRewritePattern&lt;vector::ShapeCastOp&gt; {
 /// ```
 /// // Flatten scalable vector
 /// %c = arith.constant dense&lt;0&gt; : vector&lt;[8]xi32&gt;
-/// %0 = vector.extract %arg0[0, 0] : vector&lt;2x1x[4]xi32&gt;
+/// %0 = vector.extract %arg0[0, 0] : vector&lt;[4]xi32&gt; from vector&lt;2x1x[4]xi32&gt;
 /// %1 = vector.scalable.insert %0, %c[0] : vector&lt;[4]xi32&gt; into vector&lt;[8]xi32&gt;
-/// %2 = vector.extract %arg0[1, 0] : vector&lt;2x1x[4]xi32&gt;
+/// %2 = vector.extract %arg0[1, 0] : vector&lt;[4]xi32&gt; from vector&lt;2x1x[4]xi32&gt;
 /// %3 = vector.scalable.insert %2, %1[4] : vector&lt;[4]xi32&gt; into vector&lt;[8]xi32&gt;
 /// ```
 /// or:
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
index 05b5ff09321489f..5dd961f86f32127 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
@@ -1573,7 +1573,7 @@ struct WarpOpScfForOp : public OpRewritePattern&lt;WarpExecuteOnLane0Op&gt; {
 ///   %1 = &quot;some_def&quot;() : () -&gt; (vector&lt;32xf32&gt;)
 ///   vector_ext.yield %1 : vector&lt;32xf32&gt;
 /// }
-/// %a = vector.extract %0[0] : vector&lt;1xf32&gt;
+/// %a = vector.extract %0[0] : f32 from vector&lt;1xf32&gt;
 /// %r = (&quot;warp.reduction %a&quot;)
 /// ```
 struct WarpOpReduction : public OpRewritePattern&lt;WarpExecuteOnLane0Op&gt; {
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
index 207df69929c1c9f..ebdf93eafeae353 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
@@ -561,11 +561,11 @@ static SmallVector&lt;int64_t&gt; getIntValueVector(ArrayAttr arrayAttr) {
 //
 // This transforms IR like:
 //   %0 = vector.bitcast %src : vector&lt;4xf32&gt; to vector&lt;8xf16&gt;
-//   %1 = vector.extract %0[3] : vector&lt;8xf16&gt;
+//   %1 = vector.extract %0[3] : f16 from vector&lt;8xf16&gt;
 // Into:
-//   %0 = vector.extract %src[1] : vector&lt;4xf32&gt;
+//   %0 = vector.extract %src[1] : f32 from vector&lt;4xf32&gt;
 //   %1 = vector.bitcast %0: vector&lt;1xf32&gt; to vector&lt;2xf16&gt;
-//   %2 = vector.extract %1[1] : vector&lt;2xf16&gt;
+//   %2 = vector.extract %1[1] : f16 from vector&lt;2xf16&gt;
 struct BubbleDownVectorBitCastForExtract
     : public OpRewritePattern&lt;vector::ExtractOp&gt; {
   using OpRewritePattern::OpRewritePattern;
diff --git a/mlir/test/Conversion/MathToFuncs/fpowi.mlir b/mlir/test/Conversion/MathToFuncs/fpowi.mlir
index bae791707f2bb1d..7b935e2d0ae993f 100644
--- a/mlir/test/Conversion/MathToFuncs/fpowi.mlir
+++ b/mlir/test/Conversion/MathToFuncs/fpowi.mlir
@@ -82,28 +82,28 @@ func.func @fpowi64(%arg0: f64, %arg1: i64) {
 // CHECK-SAME:                           %[[VAL_0:.*]]: vector&lt;2x3xf32&gt;,
 // CHECK-SAME:                           %[[VAL_1:.*]]: vector&lt;2x3xi64&gt;) {
 // CHECK:           %[[VAL_2:.*]] = arith.constant dense&lt;0.000000e+00&gt; : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_3:.*]] = vector.extract %[[VAL_0]][0, 0] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_4:.*]] = vector.extract %[[VAL_1]][0, 0] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_3:.*]] = vector.extract %[[VAL_0]][0, 0] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_4:.*]] = vector.extract %[[VAL_1]][0, 0] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_5:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_3]], %[[VAL_4]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_6:.*]] = vector.insert %[[VAL_5]], %[[VAL_2]] [0, 0] : f32 into vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_7:.*]] = vector.extract %[[VAL_0]][0, 1] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_8:.*]] = vector.extract %[[VAL_1]][0, 1] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_7:.*]] = vector.extract %[[VAL_0]][0, 1] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_8:.*]] = vector.extract %[[VAL_1]][0, 1] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_9:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_7]], %[[VAL_8]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_10:.*]] = vector.insert %[[VAL_9]], %[[VAL_6]] [0, 1] : f32 into vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_11:.*]] = vector.extract %[[VAL_0]][0, 2] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_12:.*]] = vector.extract %[[VAL_1]][0, 2] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_11:.*]] = vector.extract %[[VAL_0]][0, 2] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_12:.*]] = vector.extract %[[VAL_1]][0, 2] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_13:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_11]], %[[VAL_12]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_14:.*]] = vector.insert %[[VAL_13]], %[[VAL_10]] [0, 2] : f32 into vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_15:.*]] = vector.extract %[[VAL_0]][1, 0] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_16:.*]] = vector.extract %[[VAL_1]][1, 0] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_15:.*]] = vector.extract %[[VAL_0]][1, 0] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_16:.*]] = vector.extract %[[VAL_1]][1, 0] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_17:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_15]], %[[VAL_16]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_18:.*]] = vector.insert %[[VAL_17]], %[[VAL_14]] [1, 0] : f32 into vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_19:.*]] = vector.extract %[[VAL_0]][1, 1] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_20:.*]] = vector.extract %[[VAL_1]][1, 1] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_19:.*]] = vector.extract %[[VAL_0]][1, 1] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_20:.*]] = vector.extract %[[VAL_1]][1, 1] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_21:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_19]], %[[VAL_20]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_22:.*]] = vector.insert %[[VAL_21]], %[[VAL_18]] [1, 1] : f32 into vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_23:.*]] = vector.extract %[[VAL_0]][1, 2] : vector&lt;2x3xf32&gt;
-// CHECK:           %[[VAL_24:.*]] = vector.extract %[[VAL_1]][1, 2] : vector&lt;2x3xi64&gt;
+// CHECK:           %[[VAL_23:.*]] = vector.extract %[[VAL_0]][1, 2] : f32 from vector&lt;2x3xf32&gt;
+// CHECK:           %[[VAL_24:.*]] = vector.extract %[[VAL_1]][1, 2] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:           %[[VAL_25:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_23]], %[[VAL_24]]) : (f32, i64) -&gt; f32
 // CHECK:           %[[VAL_26:.*]] = vector.insert %[[VAL_25]], %[[VAL_22]] [1, 2] : f32 into vector&lt;2x3xf32&gt;
 // CHECK:           return
diff --git a/mlir/test/Conversion/MathToFuncs/ipowi.mlir b/mlir/test/Conversion/MathToFuncs/ipowi.mlir
index 8bc7f7f52ce57b8..e464e9ca9564fca 100644
--- a/mlir/test/Conversion/MathToFuncs/ipowi.mlir
+++ b/mlir/test/Conversion/MathToFuncs/ipowi.mlir
@@ -141,28 +141,28 @@ func.func @ipowi(%arg0: i8, %arg1: i8) {
 // CHECK-SAME:                          %[[VAL_1:.*]]: vector&lt;2x3xi64&gt;) {
 func.func @ipowi_vec(%arg0: vector&lt;2x3xi64&gt;, %arg1: vector&lt;2x3xi64&gt;) {
 // CHECK:   %[[CST:.*]] = arith.constant dense&lt;0&gt; : vector&lt;2x3xi64&gt;
-// CHECK:   %[[B00:.*]] = vector.extract %[[VAL_0]][0, 0] : vector&lt;2x3xi64&gt;
-// CHECK:   %[[E00:.*]] = vector.extract %[[VAL_1]][0, 0] : vector&lt;2x3xi64&gt;
+// CHECK:   %[[B00:.*]] = vector.extract %[[VAL_0]][0, 0] : i64 from vector&lt;2x3xi64&gt;
+// CHECK:   %[[E00:.*]] = vector.extract %[[VAL_1]][0, 0] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:   %[[R00:.*]] = call @__mlir_math_ipowi_i64(%[[B00]], %[[E00]]) : (i64, i64) -&gt; i64
 // CHECK:   %[[TMP00:.*]] = vector.insert %[[R00]], %[[CST]] [0, 0] : i64 into vector&lt;2x3xi64&gt;
-// CHECK:   %[[B01:.*]] = vector.extract %[[VAL_0]][0, 1] : vector&lt;2x3xi64&gt;
-// CHECK:   %[[E01:.*]] = vector.extract %[[VAL_1]][0, 1] : vector&lt;2x3xi64&gt;
+// CHECK:   %[[B01:.*]] = vector.extract %[[VAL_0]][0, 1] : i64 from vector&lt;2x3xi64&gt;
+// CHECK:   %[[E01:.*]] = vector.extract %[[VAL_1]][0, 1] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:   %[[R01:.*]] = call @__mlir_math_ipowi_i64(%[[B01]], %[[E01]]) : (i64, i64) -&gt; i64
 // CHECK:   %[[TMP01:.*]] = vector.insert %[[R01]], %[[TMP00]] [0, 1] : i64 into vector&lt;2x3xi64&gt;
-// CHECK:   %[[B02:.*]] = vector.extract %[[VAL_0]][0, 2] : vector&lt;2x3xi64&gt;
-// CHECK:   %[[E02:.*]] = vector.extract %[[VAL_1]][0, 2] : vector&lt;2x3xi64&gt;
+// CHECK:   %[[B02:.*]] = vector.extract %[[VAL_0]][0, 2] : i64 from vector&lt;2x3xi64&gt;
+// CHECK:   %[[E02:.*]] = vector.extract %[[VAL_1]][0, 2] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:   %[[R02:.*]] = call @__mlir_math_ipowi_i64(%[[B02]], %[[E02]]) : (i64, i64) -&gt; i64
 // CHECK:   %[[TMP02:.*]] = vector.insert %[[R02]], %[[TMP01]] [0, 2] : i64 into vector&lt;2x3xi64&gt;
-// CHECK:   %[[B10:.*]] = vector.extract %[[VAL_0]][1, 0] : vector&lt;2x3xi64&gt;
-// CHECK:   %[[E10:.*]] = vector.extract %[[VAL_1]][1, 0] : vector&lt;2x3xi64&gt;
+// CHECK:   %[[B10:.*]] = vector.extract %[[VAL_0]][1, 0] : i64 from vector&lt;2x3xi64&gt;
+// CHECK:   %[[E10:.*]] = vector.extract %[[VAL_1]][1, 0] : i64 from vector&lt;2x3xi64&gt;
 // CHECK:   %[[R10:.*]] = call @__mlir_math_ipowi_i64(%[[B10]], %[[E10]]) : (i64, i64) -&gt; i64
 // CHECK:   %[[TMP10:.*]] = vector.insert %[[R10]], %[[TMP02]] [1, 0] : i64 into vector&lt;2...
<truncated>
</pre>
</details>


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


More information about the Mlir-commits mailing list