[llvm-branch-commits] [mlir] [mlir][memref] Check memory space before lowering alloc ops (PR #134427)
Matthias Springer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Apr 6 23:55:06 PDT 2025
================
@@ -22,7 +22,7 @@ func.func @bad_address_space(%a: memref<2xindex, "foo">) {
// CHECK-LABEL: @invalid_int_conversion
func.func @invalid_int_conversion() {
- // expected-error at +1 {{conversion of memref memory space 1 : ui64 to integer address space failed. Consider adding memory space conversions.}}
+ // expected-error at unknown{{conversion of memref memory space 1 : ui64 to integer address space failed. Consider adding memory space conversions.}}
----------------
matthias-springer wrote:
I'm thinking of maybe even removing this error entirely (not in this PR). This error is produced in the type converter. We don't usually produce errors there.
There are other ways to signal this to the user: when the type converter fails, the pattern does not apply. Either because a hand-written `converter.convertType` fails or because the values of the adaptor could not be computed. In either case, `-debug` would show that (`notifyMatchFailure`).
https://github.com/llvm/llvm-project/pull/134427
More information about the llvm-branch-commits
mailing list