HomePhabricator

[PPC] Inline expansion of memcmp

Description

[PPC] Inline expansion of memcmp

This patch does an inline expansion of memcmp.
It changes the memcmp library call into an inline expansion when the size is
known at compile time and is under a target specified threshold.
This expansion is implemented in CodeGenPrepare and expands into straight line
code. The target specifies a maximum load size and the expansion works by using
this size to load the two sources, compare, and exit early if a difference is
found. It also has a special case when the memcmp result is used in a compare
to zero equality.

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

Details

Committed
syzaaraMay 31 2017, 10:12 AM
Differential Revision
D28637: [PPC] Inline expansion of memcmp
Parents
rL304312: Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
Branches
Unknown
Tags
Unknown