[llvm-branch-commits] [llvm] [mlir] [IR] Make @llvm.memset prototype byte width dependent (PR #106537)

Sergei Barannikov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 29 09:34:33 PDT 2024


s-barannikov wrote:

> I don't think this is the right direction for memset. I would prefer actually overloading it and making the memset/memset.pattern distinction redundant. See also [#97583 (comment)](https://github.com/llvm/llvm-project/pull/97583#issuecomment-2288302946) and following comments.

Thanks for the link. I'm in favor of the RFC and in fact I considered this approach, too. It will take long time for the llvm.memset to be replaced with llvm.memset.pattern though, and until then we need to get llvm.memset working with non-8-bit bytes somehow. The suggested approach requires minimum changes, is backward compatible, and follows the semantics specified by the LangRef:

> The ‘llvm.memset.*’ intrinsics fill “len” bytes of memory starting at the destination location.

That said, I can keep this patch downstream if you think it does something wrong.


https://github.com/llvm/llvm-project/pull/106537


More information about the llvm-branch-commits mailing list