[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<3x7x8xf32>
%c = vector.splat %1 : vector<3x7x8xf32>
-%d = vector.extract %0[1]: vector<3x7x8xf32> // -> vector<7x8xf32>
-%e = vector.extract %0[1, 5]: vector<3x7x8xf32> // -> vector<8xf32>
+%d = vector.extract %0[1]: vector<7x8xf32> from vector<3x7x8xf32>
+%e = vector.extract %0[1, 5]: vector<8xf32> from vector<3x7x8xf32>
%f = vector.outerproduct %0, %1: vector<4xf32>, vector<8xf32> // -> vector<4x8xf32>
%g = vector.outerproduct %0, %1, %2: vector<4xf32>, vector<8xf32> // 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<0, 0>>,
InferTypeOpAdaptorWithIsCompatible]>,
Arguments<(ins AnyVectorOfAnyRank:$vector, DenseI64ArrayAttr:$position)>,
- Results<(outs AnyType)> {
+ Results<(outs AnyType:$result)> {
let summary = "extract operation";
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<4x8x16xf32>
- %2 = vector.extract %0[3, 3, 3]: vector<4x8x16xf32>
- %3 = vector.extract %1[]: vector<f32>
+ %1 = vector.extract %0[3]: vector<8x16xf32> from vector<4x8x16xf32>
+ %2 = vector.extract %0[3, 3, 3]: f32 from vector<4x8x16xf32>
+ %3 = vector.extract %1[]: vector<f32> from vector<f32>
```
}];
let builders = [
@@ -600,7 +600,9 @@ def Vector_ExtractOp :
return ::llvm::cast<VectorType>(getVector().getType());
}
}];
- let assemblyFormat = "$vector `` $position attr-dict `:` type($vector)";
+ let assemblyFormat =
+ "$vector `` $position attr-dict `:` type($result) `from` type($vector)";
+
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<5x4xf32>
+/// %v0 = vector.extract %vec[0] : vector<4xf32> from vector<5x4xf32>
/// vector.transfer_write %v0, %A[%a, %b, %c] : vector<4xf32>, memref<...>
-/// %v1 = vector.extract %vec[1] : vector<5x4xf32>
+/// %v1 = vector.extract %vec[1] : vector<4xf32> from vector<5x4xf32>
/// vector.transfer_write %v1, %A[%a, %b + 1, %c] : vector<4xf32>, memref<...>
/// ...
-/// %v4 = vector.extract %vec[4] : vector<5x4xf32>
+/// %v4 = vector.extract %vec[4] : vector<4xf32> from vector<5x4xf32>
/// vector.transfer_write %v4, %A[%a, %b + 4, %c] : vector<4xf32>, memref<...>
/// ```
///
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<LinalgOp>(op);
- return success(linalgOp && 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<3x4> into vector<2x3x4x5>
/// // extractPosition == [1, 2, 3]
- /// %ext = vector.extract %ins[1, 0]: vector<3x4x5>
+ /// %ext = vector.extract %ins[1, 0]: vector<5> from vector<3x4x5>
/// // can fold to vector.extract %source[0, 3]
- /// %ext = vector.extract %source[3]: vector<5x6>
+ /// %ext = vector.extract %source[3]: vector<6> from vector<5x6>
/// ```
/// 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<vector::ShapeCastOp> {
/// ```
/// // Flatten scalable vector
/// %c = arith.constant dense<0> : vector<[8]xi32>
-/// %0 = vector.extract %arg0[0, 0] : vector<2x1x[4]xi32>
+/// %0 = vector.extract %arg0[0, 0] : vector<[4]xi32> from vector<2x1x[4]xi32>
/// %1 = vector.scalable.insert %0, %c[0] : vector<[4]xi32> into vector<[8]xi32>
-/// %2 = vector.extract %arg0[1, 0] : vector<2x1x[4]xi32>
+/// %2 = vector.extract %arg0[1, 0] : vector<[4]xi32> from vector<2x1x[4]xi32>
/// %3 = vector.scalable.insert %2, %1[4] : vector<[4]xi32> into vector<[8]xi32>
/// ```
/// 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<WarpExecuteOnLane0Op> {
/// %1 = "some_def"() : () -> (vector<32xf32>)
/// vector_ext.yield %1 : vector<32xf32>
/// }
-/// %a = vector.extract %0[0] : vector<1xf32>
+/// %a = vector.extract %0[0] : f32 from vector<1xf32>
/// %r = ("warp.reduction %a")
/// ```
struct WarpOpReduction : public OpRewritePattern<WarpExecuteOnLane0Op> {
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<int64_t> getIntValueVector(ArrayAttr arrayAttr) {
//
// This transforms IR like:
// %0 = vector.bitcast %src : vector<4xf32> to vector<8xf16>
-// %1 = vector.extract %0[3] : vector<8xf16>
+// %1 = vector.extract %0[3] : f16 from vector<8xf16>
// Into:
-// %0 = vector.extract %src[1] : vector<4xf32>
+// %0 = vector.extract %src[1] : f32 from vector<4xf32>
// %1 = vector.bitcast %0: vector<1xf32> to vector<2xf16>
-// %2 = vector.extract %1[1] : vector<2xf16>
+// %2 = vector.extract %1[1] : f16 from vector<2xf16>
struct BubbleDownVectorBitCastForExtract
: public OpRewritePattern<vector::ExtractOp> {
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<2x3xf32>,
// CHECK-SAME: %[[VAL_1:.*]]: vector<2x3xi64>) {
// CHECK: %[[VAL_2:.*]] = arith.constant dense<0.000000e+00> : vector<2x3xf32>
-// CHECK: %[[VAL_3:.*]] = vector.extract %[[VAL_0]][0, 0] : vector<2x3xf32>
-// CHECK: %[[VAL_4:.*]] = vector.extract %[[VAL_1]][0, 0] : vector<2x3xi64>
+// CHECK: %[[VAL_3:.*]] = vector.extract %[[VAL_0]][0, 0] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_4:.*]] = vector.extract %[[VAL_1]][0, 0] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_5:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_3]], %[[VAL_4]]) : (f32, i64) -> f32
// CHECK: %[[VAL_6:.*]] = vector.insert %[[VAL_5]], %[[VAL_2]] [0, 0] : f32 into vector<2x3xf32>
-// CHECK: %[[VAL_7:.*]] = vector.extract %[[VAL_0]][0, 1] : vector<2x3xf32>
-// CHECK: %[[VAL_8:.*]] = vector.extract %[[VAL_1]][0, 1] : vector<2x3xi64>
+// CHECK: %[[VAL_7:.*]] = vector.extract %[[VAL_0]][0, 1] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_8:.*]] = vector.extract %[[VAL_1]][0, 1] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_9:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_7]], %[[VAL_8]]) : (f32, i64) -> f32
// CHECK: %[[VAL_10:.*]] = vector.insert %[[VAL_9]], %[[VAL_6]] [0, 1] : f32 into vector<2x3xf32>
-// CHECK: %[[VAL_11:.*]] = vector.extract %[[VAL_0]][0, 2] : vector<2x3xf32>
-// CHECK: %[[VAL_12:.*]] = vector.extract %[[VAL_1]][0, 2] : vector<2x3xi64>
+// CHECK: %[[VAL_11:.*]] = vector.extract %[[VAL_0]][0, 2] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_12:.*]] = vector.extract %[[VAL_1]][0, 2] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_13:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_11]], %[[VAL_12]]) : (f32, i64) -> f32
// CHECK: %[[VAL_14:.*]] = vector.insert %[[VAL_13]], %[[VAL_10]] [0, 2] : f32 into vector<2x3xf32>
-// CHECK: %[[VAL_15:.*]] = vector.extract %[[VAL_0]][1, 0] : vector<2x3xf32>
-// CHECK: %[[VAL_16:.*]] = vector.extract %[[VAL_1]][1, 0] : vector<2x3xi64>
+// CHECK: %[[VAL_15:.*]] = vector.extract %[[VAL_0]][1, 0] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_16:.*]] = vector.extract %[[VAL_1]][1, 0] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_17:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_15]], %[[VAL_16]]) : (f32, i64) -> f32
// CHECK: %[[VAL_18:.*]] = vector.insert %[[VAL_17]], %[[VAL_14]] [1, 0] : f32 into vector<2x3xf32>
-// CHECK: %[[VAL_19:.*]] = vector.extract %[[VAL_0]][1, 1] : vector<2x3xf32>
-// CHECK: %[[VAL_20:.*]] = vector.extract %[[VAL_1]][1, 1] : vector<2x3xi64>
+// CHECK: %[[VAL_19:.*]] = vector.extract %[[VAL_0]][1, 1] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_20:.*]] = vector.extract %[[VAL_1]][1, 1] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_21:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_19]], %[[VAL_20]]) : (f32, i64) -> f32
// CHECK: %[[VAL_22:.*]] = vector.insert %[[VAL_21]], %[[VAL_18]] [1, 1] : f32 into vector<2x3xf32>
-// CHECK: %[[VAL_23:.*]] = vector.extract %[[VAL_0]][1, 2] : vector<2x3xf32>
-// CHECK: %[[VAL_24:.*]] = vector.extract %[[VAL_1]][1, 2] : vector<2x3xi64>
+// CHECK: %[[VAL_23:.*]] = vector.extract %[[VAL_0]][1, 2] : f32 from vector<2x3xf32>
+// CHECK: %[[VAL_24:.*]] = vector.extract %[[VAL_1]][1, 2] : i64 from vector<2x3xi64>
// CHECK: %[[VAL_25:.*]] = call @__mlir_math_fpowi_f32_i64(%[[VAL_23]], %[[VAL_24]]) : (f32, i64) -> f32
// CHECK: %[[VAL_26:.*]] = vector.insert %[[VAL_25]], %[[VAL_22]] [1, 2] : f32 into vector<2x3xf32>
// 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<2x3xi64>) {
func.func @ipowi_vec(%arg0: vector<2x3xi64>, %arg1: vector<2x3xi64>) {
// CHECK: %[[CST:.*]] = arith.constant dense<0> : vector<2x3xi64>
-// CHECK: %[[B00:.*]] = vector.extract %[[VAL_0]][0, 0] : vector<2x3xi64>
-// CHECK: %[[E00:.*]] = vector.extract %[[VAL_1]][0, 0] : vector<2x3xi64>
+// CHECK: %[[B00:.*]] = vector.extract %[[VAL_0]][0, 0] : i64 from vector<2x3xi64>
+// CHECK: %[[E00:.*]] = vector.extract %[[VAL_1]][0, 0] : i64 from vector<2x3xi64>
// CHECK: %[[R00:.*]] = call @__mlir_math_ipowi_i64(%[[B00]], %[[E00]]) : (i64, i64) -> i64
// CHECK: %[[TMP00:.*]] = vector.insert %[[R00]], %[[CST]] [0, 0] : i64 into vector<2x3xi64>
-// CHECK: %[[B01:.*]] = vector.extract %[[VAL_0]][0, 1] : vector<2x3xi64>
-// CHECK: %[[E01:.*]] = vector.extract %[[VAL_1]][0, 1] : vector<2x3xi64>
+// CHECK: %[[B01:.*]] = vector.extract %[[VAL_0]][0, 1] : i64 from vector<2x3xi64>
+// CHECK: %[[E01:.*]] = vector.extract %[[VAL_1]][0, 1] : i64 from vector<2x3xi64>
// CHECK: %[[R01:.*]] = call @__mlir_math_ipowi_i64(%[[B01]], %[[E01]]) : (i64, i64) -> i64
// CHECK: %[[TMP01:.*]] = vector.insert %[[R01]], %[[TMP00]] [0, 1] : i64 into vector<2x3xi64>
-// CHECK: %[[B02:.*]] = vector.extract %[[VAL_0]][0, 2] : vector<2x3xi64>
-// CHECK: %[[E02:.*]] = vector.extract %[[VAL_1]][0, 2] : vector<2x3xi64>
+// CHECK: %[[B02:.*]] = vector.extract %[[VAL_0]][0, 2] : i64 from vector<2x3xi64>
+// CHECK: %[[E02:.*]] = vector.extract %[[VAL_1]][0, 2] : i64 from vector<2x3xi64>
// CHECK: %[[R02:.*]] = call @__mlir_math_ipowi_i64(%[[B02]], %[[E02]]) : (i64, i64) -> i64
// CHECK: %[[TMP02:.*]] = vector.insert %[[R02]], %[[TMP01]] [0, 2] : i64 into vector<2x3xi64>
-// CHECK: %[[B10:.*]] = vector.extract %[[VAL_0]][1, 0] : vector<2x3xi64>
-// CHECK: %[[E10:.*]] = vector.extract %[[VAL_1]][1, 0] : vector<2x3xi64>
+// CHECK: %[[B10:.*]] = vector.extract %[[VAL_0]][1, 0] : i64 from vector<2x3xi64>
+// CHECK: %[[E10:.*]] = vector.extract %[[VAL_1]][1, 0] : i64 from vector<2x3xi64>
// CHECK: %[[R10:.*]] = call @__mlir_math_ipowi_i64(%[[B10]], %[[E10]]) : (i64, i64) -> i64
// CHECK: %[[TMP10:.*]] = vector.insert %[[R10]], %[[TMP02]] [1, 0] : i64 into vector<2...
<truncated>
</pre>
</details>
https://github.com/llvm/llvm-project/pull/66499
More information about the Mlir-commits
mailing list