[PATCH] D28637: [PPC] Inline expansion of memcmp

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 09:56:47 PST 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2233
+    Builder.Insert(NewBr);
+    return;
+  }
----------------
syzaara wrote:
> efriedma wrote:
> > Hmm... in isOnlyUsedInZeroEqualityComparison mode, it probably makes sense to perform more loads per block, to reduce the number of branches.
> I'm not sure what you mean here. We have the branches for doing an early exit so we don't need to continue loading more bytes when we find a difference.
A couple loads hitting the cache are cheaper than a branch in cases where the branch isn't predictable... but maybe not a big deal either way.


https://reviews.llvm.org/D28637





More information about the llvm-commits mailing list