[PATCH] D28637: [PPC] Inline expansion of memcmp
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 12:27:58 PDT 2017
efriedma added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2319
+
+unsigned MemCmpExpansion::getLoadSize(unsigned Size) {
+ unsigned LoadSize = MaxLoadSize;
----------------
syzaara wrote:
> efriedma wrote:
> > `return MinAlign(Size, MaxLoadSize)`?
> MinAlign doesn't work here. MinAlign returns the largest power of 2 that divides both Size and MaxLoadSize. We want the largest power of 2 which is <= Size.
Oh, so `MinAlign(PowerOf2Floor(Size), MaxLoadSize)`?
https://reviews.llvm.org/D28637
More information about the llvm-commits
mailing list