OSDN Git Service

[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 25 Jul 2017 17:04:37 +0000 (17:04 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 25 Jul 2017 17:04:37 +0000 (17:04 +0000)
commit902fe6e6a0c0272e3dc58a47da791fe9b9b6b533
treeb08b0555fdf871e96e6548e7da2c3ddb1341cc13
parentae9f3ffd871a87d0f3c19a85f70288c23e67ba63
[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)

D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914).

Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os).

This patch should be considered for the 5.0.0 release branch as well

Differential Revision: https://reviews.llvm.org/D35830

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308986 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/memcmp.ll
test/Transforms/CodeGenPrepare/X86/memcmp.ll