[PATCH] D33963: [CGP / PowerPC] use direct compares if there's only one load per block in memcmp() expansion

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 15:42:03 PDT 2017


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

I'd like to enable CGP memcmp expansion for x86, but the output from CGP would regress the special cases (memcmp(x,y,N) != 0 for N=1,2,4,8,16,32 bytes) that we already handle.

I'm not sure if we'll actually be able to produce the optimal code given the block-at-a-time limitation in the DAG. We might have to just avoid those special-cases here in CGP. But regardless of that, I think this is a win for the more general cases.

http://rise4fun.com/Alive/cbQ


https://reviews.llvm.org/D33963

Files:
  lib/CodeGen/CodeGenPrepare.cpp
  test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33963.101635.patch
Type: text/x-patch
Size: 5848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170606/19c3071c/attachment.bin>


More information about the llvm-commits mailing list