Skip to content

Commit 5f03ac1

Browse files
committed
fix ir test
1 parent 932b9c6 commit 5f03ac1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2924,24 +2924,24 @@ static LogicalResult produceSubViewErrorMsg(SliceVerificationResult result,
29242924
return success();
29252925
case SliceVerificationResult::RankTooLarge:
29262926
return op->emitError("expected result rank to be smaller or equal to ")
2927-
<< "the source rank, but got:" << op.getType();
2927+
<< "the source rank, but got " << op.getType();
29282928
case SliceVerificationResult::SizeMismatch:
29292929
return op->emitError("expected result type to be ")
29302930
<< expectedType
2931-
<< " or a rank-reduced version. (mismatch of result sizes), but got:"
2931+
<< " or a rank-reduced version. (mismatch of result sizes), but got "
29322932
<< op.getType();
29332933
case SliceVerificationResult::ElemTypeMismatch:
29342934
return op->emitError("expected result element type to be ")
2935-
<< memrefType.getElementType() << ", but got:" << op.getType();
2935+
<< memrefType.getElementType() << ", but got " << op.getType();
29362936
case SliceVerificationResult::MemSpaceMismatch:
29372937
return op->emitError(
2938-
"expected result and source memory spaces to match, but got:")
2938+
"expected result and source memory spaces to match, but got ")
29392939
<< op.getType();
29402940
case SliceVerificationResult::LayoutMismatch:
29412941
return op->emitError("expected result type to be ")
29422942
<< expectedType
29432943
<< " or a rank-reduced version. (mismatch of result layout), but "
2944-
"got:"
2944+
"got "
29452945
<< op.getType();
29462946
}
29472947
llvm_unreachable("unexpected subview verification result");

mlir/test/Dialect/MemRef/invalid.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ func.func @invalid_subview(%arg0 : index, %arg1 : index, %arg2 : index) {
703703

704704
func.func @invalid_subview(%arg0 : index, %arg1 : index, %arg2 : index) {
705705
%0 = memref.alloc() : memref<8x16x4xf32>
706-
// expected-error@+1 {{expected result element type to be 'f32'}}
706+
// expected-error@+1 {{expected result element type to be 'f32', but got 'memref<8x16x4xi32>'}}
707707
%1 = memref.subview %0[0, 0, 0][8, 16, 4][1, 1, 1]
708708
: memref<8x16x4xf32> to
709709
memref<8x16x4xi32>
@@ -714,10 +714,10 @@ func.func @invalid_subview(%arg0 : index, %arg1 : index, %arg2 : index) {
714714

715715
func.func @invalid_subview(%arg0 : index, %arg1 : index, %arg2 : index) {
716716
%0 = memref.alloc() : memref<8x16x4xf32>
717-
// expected-error@+1 {{expected result rank to be smaller or equal to the source rank.}}
717+
// expected-error@+1 {{expected result rank to be smaller or equal to the source rank, but got 'memref<8x16x4x3xf32>'}}
718718
%1 = memref.subview %0[0, 0, 0][8, 16, 4][1, 1, 1]
719719
: memref<8x16x4xf32> to
720-
memref<8x16x4x3xi32>
720+
memref<8x16x4x3xf32>
721721
return
722722
}
723723

0 commit comments

Comments
 (0)