[PATCH] D28637: [PPC] Inline expansion of memcmp
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 12:22:08 PST 2017
efriedma added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1943
+
+ if (SizeVal > TLI->getMaxLoadsPerMemcmp(0)) {
+ NumMemCmpGreaterThanMax++;
----------------
syzaara wrote:
> nemanjai wrote:
> > Is this how we want to use `getMaxLoadsPerMemcmp()`? The name seems to suggest to me that this is a threshold for how many actual load instructions can be emitted. But this appears to be used as the maximum number of bytes that can be loaded. Or am I misreading what `SizeVal` is?
> Ya, this was the same way it was used for memcpy/memset etc. It seems like number of stores but actually returns number of bytes. Just followed it for consistency.
No, getMaxStoresPerMemcpy is definitely the number of memory operations, not the number of bytes.
https://reviews.llvm.org/D28637
More information about the llvm-commits
mailing list