diff options
| author | Nicolas Vasilache <ntv@google.com> | 2019-11-14 15:39:36 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-11-14 15:40:07 -0800 |
| commit | 0b271b7dfe285064b8b237d18bfc923212e7a77b (patch) | |
| tree | 3783613205ec9f87106a6fa7f730e22f97d91745 /mlir/test/Conversion/VectorToLLVM | |
| parent | a78bd84cf84c00914f48781fa0c561cbb6bdf847 (diff) | |
| download | bcm5719-llvm-0b271b7dfe285064b8b237d18bfc923212e7a77b.tar.gz bcm5719-llvm-0b271b7dfe285064b8b237d18bfc923212e7a77b.zip | |
Refactor the LowerVectorTransfers pass to use the RewritePattern infra - NFC
This is step 1/n in refactoring infrastructure along the Vector dialect to make it ready for retargetability and composable progressive lowering.
PiperOrigin-RevId: 280529784
Diffstat (limited to 'mlir/test/Conversion/VectorToLLVM')
| -rw-r--r-- | mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir b/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir deleted file mode 100644 index 6c5e8079ee1..00000000000 --- a/mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir +++ /dev/null @@ -1,64 +0,0 @@ -// RUN: mlir-opt %s -convert-vector-to-llvm | FileCheck %s - -func @outerproduct(%arg0: vector<2xf32>, %arg1: vector<3xf32>) -> vector<2x3xf32> { - %2 = vector.outerproduct %arg0, %arg1 : vector<2xf32>, vector<3xf32> - return %2 : vector<2x3xf32> -} -// CHECK-LABEL: outerproduct -// CHECK: llvm.mlir.undef : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.shufflevector {{.*}} [0 : i32, 0 : i32, 0 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>"> -// CHECK: llvm.fmul {{.*}}, {{.*}} : !llvm<"<3 x float>"> -// CHECK: llvm.insertvalue {{.*}}[0] : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.shufflevector {{.*}} [1 : i32, 1 : i32, 1 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>"> -// CHECK: llvm.fmul {{.*}}, {{.*}} : !llvm<"<3 x float>"> -// CHECK: llvm.insertvalue {{.*}}[1] : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.return {{.*}} : !llvm<"[2 x <3 x float>]"> - -func @outerproduct_add(%arg0: vector<2xf32>, %arg1: vector<3xf32>, %arg2: vector<2x3xf32>) -> vector<2x3xf32> { - %2 = vector.outerproduct %arg0, %arg1, %arg2 : vector<2xf32>, vector<3xf32> - return %2 : vector<2x3xf32> -} -// CHECK-LABEL: outerproduct_add -// CHECK: llvm.mlir.undef : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.shufflevector {{.*}} [0 : i32, 0 : i32, 0 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>"> -// CHECK: llvm.extractvalue {{.*}}[0] : !llvm<"[2 x <3 x float>]"> -// CHECK: "llvm.intr.fmuladd"({{.*}}) : (!llvm<"<3 x float>">, !llvm<"<3 x float>">, !llvm<"<3 x float>">) -> !llvm<"<3 x float>"> -// CHECK: llvm.insertvalue {{.*}}[0] : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.shufflevector {{.*}} [1 : i32, 1 : i32, 1 : i32] : !llvm<"<2 x float>">, !llvm<"<2 x float>"> -// CHECK: llvm.extractvalue {{.*}}[1] : !llvm<"[2 x <3 x float>]"> -// CHECK: "llvm.intr.fmuladd"({{.*}}) : (!llvm<"<3 x float>">, !llvm<"<3 x float>">, !llvm<"<3 x float>">) -> !llvm<"<3 x float>"> -// CHECK: llvm.insertvalue {{.*}}[1] : !llvm<"[2 x <3 x float>]"> -// CHECK: llvm.return {{.*}} : !llvm<"[2 x <3 x float>]"> - -func @extract_vec_2d_from_vec_3d(%arg0: vector<4x3x16xf32>) -> vector<3x16xf32> { - %0 = vector.extractelement %arg0[0 : i32]: vector<4x3x16xf32> - return %0 : vector<3x16xf32> -} -// CHECK-LABEL: extract_vec_2d_from_vec_3d -// CHECK: llvm.extractvalue %{{.*}}[0 : i32] : !llvm<"[4 x [3 x <16 x float>]]"> -// CHECK: llvm.return %{{.*}} : !llvm<"[3 x <16 x float>]"> - -func @extract_element_from_vec_3d(%arg0: vector<4x3x16xf32>) -> f32 { - %0 = vector.extractelement %arg0[0 : i32, 0 : i32, 0 : i32]: vector<4x3x16xf32> - return %0 : f32 -} -// CHECK-LABEL: extract_element_from_vec_3d -// CHECK: llvm.extractvalue %{{.*}}[0 : i32, 0 : i32] : !llvm<"[4 x [3 x <16 x float>]]"> -// CHECK: llvm.mlir.constant(0 : i32) : !llvm.i32 -// CHECK: llvm.extractelement %{{.*}}, %{{.*}} : !llvm<"<16 x float>"> -// CHECK: llvm.return %{{.*}} : !llvm.float - -func @vector_type_cast(%arg0: memref<8x8x8xf32>) -> memref<vector<8x8x8xf32>> { - %0 = vector.type_cast %arg0: memref<8x8x8xf32> to memref<vector<8x8x8xf32>> - return %0 : memref<vector<8x8x8xf32>> -} -// CHECK-LABEL: vector_type_cast -// CHECK: llvm.mlir.undef : !llvm<"{ [8 x [8 x <8 x float>]]*, [8 x [8 x <8 x float>]]*, i64 }"> -// CHECK: %[[allocated:.*]] = llvm.extractvalue {{.*}}[0] : !llvm<"{ float*, float*, i64, [3 x i64], [3 x i64] }"> -// CHECK: %[[allocatedBit:.*]] = llvm.bitcast %[[allocated]] : !llvm<"float*"> to !llvm<"[8 x [8 x <8 x float>]]*"> -// CHECK: llvm.insertvalue %[[allocatedBit]], {{.*}}[0] : !llvm<"{ [8 x [8 x <8 x float>]]*, [8 x [8 x <8 x float>]]*, i64 }"> -// CHECK: %[[aligned:.*]] = llvm.extractvalue {{.*}}[1] : !llvm<"{ float*, float*, i64, [3 x i64], [3 x i64] }"> -// CHECK: %[[alignedBit:.*]] = llvm.bitcast %[[aligned]] : !llvm<"float*"> to !llvm<"[8 x [8 x <8 x float>]]*"> -// CHECK: llvm.insertvalue %[[alignedBit]], {{.*}}[1] : !llvm<"{ [8 x [8 x <8 x float>]]*, [8 x [8 x <8 x float>]]*, i64 }"> -// CHECK: llvm.mlir.constant(0 : index -// CHECK: llvm.insertvalue {{.*}}[2] : !llvm<"{ [8 x [8 x <8 x float>]]*, [8 x [8 x <8 x float>]]*, i64 }"> |

