[PATCH] D124119: [AArch64] Combine instructions of type or/and where AND masks can be combined.
Biplob Mishra via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 12:54:29 PDT 2022
bipmis created this revision.
bipmis added reviewers: spatel, RKSimon, dmgreen.
bipmis added projects: LLVM, All.
bipmis requested review of this revision.
The patch simplifies some of the patterns as below
(A | (B & C0)) | (B & C1 <https://reviews.llvm.org/C1>) -> A | (B & C1 <https://reviews.llvm.org/C1>|C2)
((B & C0) | A) | (B & C1 <https://reviews.llvm.org/C1>) -> (B & C1 <https://reviews.llvm.org/C1>|C2) | A
In some scenarios like byte reverse on half word, we can see this pattern multiple times and this conversion can optimize these patterns.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124119
Files:
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/and-or.ll
llvm/test/Transforms/InstCombine/or.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124119.424000.patch
Type: text/x-patch
Size: 4385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220420/99424070/attachment.bin>
More information about the llvm-commits
mailing list