[PATCH] D137798: [DAG] Fold zext into loads across an and/or/xor operation
Benjamin Maxwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 12:41:03 PST 2022
benmxwl-arm created this revision.
Herald added subscribers: ecnelises, pengfei, hiraditya, kristof.beyls.
Herald added a project: All.
benmxwl-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch adds a new fold:
(zext (xor/and/or (load x), (load y)))
->
(xor/and/or (zextload x), (zextload y))
Which enables further optimizations that allows simplifying quite a
few memcmp cases (specifically on AArch64).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137798
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/bcmp.ll
llvm/test/CodeGen/X86/memcmp-more-load-pairs-x32.ll
llvm/test/CodeGen/X86/memcmp-more-load-pairs.ll
llvm/test/CodeGen/X86/memcmp-optsize-x32.ll
llvm/test/CodeGen/X86/memcmp-optsize.ll
llvm/test/CodeGen/X86/memcmp-pgso-x32.ll
llvm/test/CodeGen/X86/memcmp-pgso.ll
llvm/test/CodeGen/X86/memcmp-x32.ll
llvm/test/CodeGen/X86/memcmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137798.474595.patch
Type: text/x-patch
Size: 19682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221110/ed54f510/attachment.bin>
More information about the llvm-commits
mailing list