[PATCH] D136672: [ExpandMemCmp][AArch64] Add a new option PreferCmpToExpand in inMemCmpExpansionOptions and enable or AArch64
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 02:53:17 PDT 2022
bcl5980 created this revision.
bcl5980 added reviewers: nikic, RKSimon, efriedma, dmgreen, spatel.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Current code use xor+or pattern to expand memcmp, but it is not efficient on AArch64.
This patch adds a new option PreferCmpToExpand, use cmp+or pattern to expand.
Fix: #56543
https://reviews.llvm.org/D136672
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/CodeGen/ExpandMemCmp.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/CodeGen/AArch64/bcmp-inline-small.ll
llvm/test/CodeGen/AArch64/bcmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136672.470425.patch
Type: text/x-patch
Size: 20197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221025/c8ec19cc/attachment.bin>
More information about the llvm-commits
mailing list