[PATCH] D97667: [loop-idiom] Hoist loop memcpys to loop preheader

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 07:50:43 PDT 2021


dstenb added a comment.

In D97667#2730798 <https://reviews.llvm.org/D97667#2730798>, @zhuhan0 wrote:

> In D97667#2725626 <https://reviews.llvm.org/D97667#2725626>, @dstenb wrote:
>
>> With this patch we got the following assertion:
>>
>>   bool llvm::APInt::operator==(const llvm::APInt &) const: Assertion `BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"' failed.
>>
>> in `LoopIdiomRecognize::processLoopMemCpy()` at the following comparison:
>>
>>   // Check if the load stride matches the store stride.
>>   if (StrIntStride != LoadIntStride && StrIntStride != -LoadIntStride)
>>     return false;
>>
>> for a memcpy done between two address spaces with different pointer sizes.
>>
>> I don't have a upstream reproducer ready for this, but I'll see if I can create one.
>
> The new version should fix the assertion I think. Let me know if you still see it.

Yes, thanks! That fixed it. I did not manage to create an upstream reproducer from the downstream one unfortunately.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97667/new/

https://reviews.llvm.org/D97667



More information about the llvm-commits mailing list