|
1 |
| -// Note: borrowed/copied from mlir/test/Target/LLVMIR/arm-sme-invalid.mlir |
2 |
| - |
3 | 1 | // Check that verify-diagnostics=only-expected passes with only one actual `expected-error`
|
4 |
| -// RUN: mlir-translate %s -verify-diagnostics=only-expected -split-input-file -mlir-to-llvmir |
5 |
| - |
6 |
| -// Check that verify-diagnostics=all fails because we're missing three `expected-error` |
7 |
| -// RUN: not mlir-translate %s -verify-diagnostics=all -split-input-file -mlir-to-llvmir 2>&1 | FileCheck %s --check-prefix=CHECK-VERIFY-ALL |
8 |
| -// CHECK-VERIFY-ALL: error: unexpected error: 'arm_sme.intr.write.horiz' op failed to verify that all of {predicate, vector} have same shape |
9 |
| -// CHECK-VERIFY-ALL-NEXT: "arm_sme.intr.write.horiz" |
10 |
| -// CHECK-VERIFY-ALL: error: unexpected error: 'arm_sme.intr.read.horiz' op failed to verify that all of {vector, res} have same element type |
11 |
| -// CHECK-VERIFY-ALL-NEXT: %res = "arm_sme.intr.read.horiz" |
12 |
| -// CHECK-VERIFY-ALL: error: unexpected error: 'arm_sme.intr.cntsb' op failed to verify that `res` is i64 |
13 |
| -// CHECK-VERIFY-ALL-NEXT: %res = "arm_sme.intr.cntsb" |
| 2 | +// RUN: mlir-translate %s --allow-unregistered-dialect -verify-diagnostics=only-expected -split-input-file -mlir-to-llvmir |
14 | 3 |
|
15 |
| -llvm.func @arm_sme_vector_to_tile_invalid_types(%tileslice : i32, |
16 |
| - %nxv4i1 : vector<[4]xi1>, |
17 |
| - %nxv16i8 : vector<[16]xi8>) { |
18 |
| - "arm_sme.intr.write.horiz"(%tileslice, %nxv4i1, %nxv16i8) <{tile_id = 0 : i32}> : |
19 |
| - (i32, vector<[4]xi1>, vector<[16]xi8>) -> () |
20 |
| - llvm.return |
21 |
| -} |
22 |
| - |
23 |
| -// ----- |
| 4 | +// Check that verify-diagnostics=all fails because we're missing two `expected-error` |
| 5 | +// RUN: not mlir-translate %s --allow-unregistered-dialect -verify-diagnostics=all -split-input-file -mlir-to-llvmir 2>&1 | FileCheck %s --check-prefix=CHECK-VERIFY-ALL |
| 6 | +// CHECK-VERIFY-ALL: unexpected error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator1 |
| 7 | +// CHECK-VERIFY-ALL: unexpected error: cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator3 |
24 | 8 |
|
25 |
| -llvm.func @arm_sme_tile_slice_to_vector_invalid_shapes( |
26 |
| - %tileslice : i32, %nxv4i1 : vector<[4]xi1>, %nxv16i8 : vector<[16]xi8> |
27 |
| -) -> vector<[3]xf32> { |
28 |
| - // expected-error @+1 {{failed to verify that all of {vector, predicate, res} have same shape}} |
29 |
| - %res = "arm_sme.intr.read.horiz"(%nxv16i8, %nxv4i1, %tileslice) <{tile_id = 0 : i32}> : |
30 |
| - (vector<[16]xi8>, vector<[4]xi1>, i32) -> vector<[3]xf32> |
31 |
| - llvm.return %res : vector<[3]xf32> |
| 9 | +llvm.func @trivial() { |
| 10 | + "simple.terminator1"() : () -> () |
32 | 11 | }
|
33 | 12 |
|
34 | 13 | // -----
|
35 | 14 |
|
36 |
| -llvm.func @arm_sme_tile_slice_to_vector_invalid_element_types( |
37 |
| - %tileslice : i32, %nxv4i1 : vector<[4]xi1>, %nxv4f32 : vector<[4]xf32> |
38 |
| -) -> vector<[3]xi32> { |
39 |
| - %res = "arm_sme.intr.read.horiz"(%nxv4f32, %nxv4i1, %tileslice) <{tile_id = 0 : i32}> : |
40 |
| - (vector<[4]xf32>, vector<[4]xi1>, i32) -> vector<[4]xi32> |
41 |
| - llvm.return %res : vector<[4]xi32> |
| 15 | +llvm.func @trivial() { |
| 16 | + // expected-error @+1 {{cannot be converted to LLVM IR: missing `LLVMTranslationDialectInterface` registration for dialect for op: simple.terminator2}} |
| 17 | + "simple.terminator2"() : () -> () |
42 | 18 | }
|
43 | 19 |
|
44 | 20 | // -----
|
45 | 21 |
|
46 |
| -llvm.func @arm_sme_streaming_vl_invalid_return_type() -> i32 { |
47 |
| - %res = "arm_sme.intr.cntsb"() : () -> i32 |
48 |
| - llvm.return %res : i32 |
| 22 | +llvm.func @trivial() { |
| 23 | + "simple.terminator3"() : () -> () |
49 | 24 | }
|
0 commit comments