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

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 07:38:02 PDT 2021


dstenb added a comment.

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.


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