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

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 21:46:10 PDT 2018


hiraditya added a comment.

In https://reviews.llvm.org/D35035#1238511, @lebedev.ri wrote:

> 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?


I think so...


https://reviews.llvm.org/D35035





More information about the llvm-commits mailing list