[PATCH] D75519: [ExpandMemCmp] Properly constant-fold all compares.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 13:31:26 PST 2020


efriedma added inline comments.


================
Comment at: llvm/test/CodeGen/X86/memcmp.ll:425
 ; X64-NEXT:    bswapl %ecx
+; X64-NEXT:    movl (%rsi), %edx
 ; X64-NEXT:    bswapl %edx
----------------
courbet wrote:
> efriedma wrote:
> > The scheduling here seems to be worse?
> I think we could argue either way: the new scheduling interleaves loads and other computations, evening out the port pressure and increased compute parallelism. On the other hand it's true that there is less data parallelism. It should not matter with recent out-of-order cores anyway.
> If you feel strongly about this I can go back to interleaving the data, this is actually orthogonal to the real change.
I'd prefer to avoid unrelated changes.

> the new scheduling interleaves loads and other computations

Scheduling an arithmetic operation that uses a loaded value immediately after the load is never going to work out; loads have latency.  Granted, I agree it's unlikely to matter much on a modern x86 core.

Really, I'm more surprised we aren't trying to do any scheduling at all after isel.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75519/new/

https://reviews.llvm.org/D75519





More information about the llvm-commits mailing list