[PATCH] D35035: [InstCombine] Prevent memcpy generation for small data size

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 09:42:46 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D35035#1238502, @hiraditya wrote:

> In https://reviews.llvm.org/D35035#1237497, @spatel wrote:
>
> > In https://reviews.llvm.org/D35035#1237401, @hiraditya wrote:
> >
> > > I think this patch is good to go, I can push this if someone accepts. I'll fix the comments.
> >
> >
> > I still don't understand the (LargestInt == 0) hack. I think everyone agrees that the existing code is wrong, so why preserve the existing behavior if we don't have a valid datalayout? Ie, there's no risk for real targets because they always have a non-zero getLargestLegalIntTypeSizeInBits()?
>
>
> Agreed, I'll remove that part then. That was only to make other testcases happy by preserving existing behavior. Thanks


Presumably those testcases should simply be updated to contain the expected datalayout?


https://reviews.llvm.org/D35035





More information about the llvm-commits mailing list