[PATCH] D31290: [x86] use PMOVMSK to replace memcmp libcalls for 16-byte equality

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 09:17:17 PDT 2017


spatel created this revision.
Herald added a subscriber: mcrosier.

This is the payoff for https://reviews.llvm.org/D31156 - if a target has efficient comparison instructions for vector-sized equality, we can replace memcmp calls with inline code that is both smaller and faster.

Seems like we're missing a load folding opportunity on the first test, but that's a separate problem.

I can enable the 32-byte case for AVX2 as an immediate follow-up, but I want to make sure this part looks ok before adding that.


https://reviews.llvm.org/D31290

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/X86/memcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31290.92816.patch
Type: text/x-patch
Size: 4881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170323/70cbf043/attachment.bin>


More information about the llvm-commits mailing list