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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 16 08:27:28 PDT 2018


lebedev.ri requested changes to this revision.
lebedev.ri added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:140
+  unsigned LargestInt = DL.getLargestLegalIntTypeSizeInBits();
+  if (!LargestInt || Size > LargestInt)
+    return nullptr;
----------------
hiraditya wrote:
> dmgreen wrote:
> > Are the units of these the same? Or is one bits and the other bytes?
> Thank you!
I think this is still broken? (and thus, any and all benchmarks thus far are incorrect.)
As it was previously pointed out by @dmgreen, `Size` is bytes, while `LargestInt` is clearly in bits.


https://reviews.llvm.org/D35035





More information about the llvm-commits mailing list