matthias-springer wrote: > shouldn't a user add their own argument materialization in this case that can > handle their type conversion and the dialect conversion will then call that > first?
Yes that's right. But if users forget to do that, they see a more cryptic error message because we are generating invalid IR. (Inserting a value of incorrect type into an LLVM struct.) If the materialization functions bails, it will trigger the `unrealized_conversion_cast` materialization, that can be debugged more easily. One reason why I'd like to add these extra checks is because they helped me adapting the MemRef type conversion rules in #116524. I think these checks will also be useful for others. > Is there an easy way we can test this by any chance? There was no good place to add such tests until now. I added a new `TestPatterns.cpp` in `test/lib/Dialect/LLVM`. https://github.com/llvm/llvm-project/pull/116532 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits