[all-commits] [llvm/llvm-project] ec4adf: [InstCombine] Combine instructions of type or/and ...
bipmis via All-commits
all-commits at lists.llvm.org
Mon May 16 04:44:39 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ec4adf1f6c333d3d36663d8f763c0896407f1b61
https://github.com/llvm/llvm-project/commit/ec4adf1f6c333d3d36663d8f763c0896407f1b61
Author: Biplob Mishra <biplob.mishra at arm.com>
Date: 2022-05-16 (Mon, 16 May 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/and-or.ll
M llvm/test/Transforms/InstCombine/or.ll
Log Message:
-----------
[InstCombine] Combine instructions of type or/and where AND masks can be combined.
The patch simplifies some of the patterns as below
(A | (B & C0)) | (B & C1) -> A | (B & C0|C1)
((B & C0) | A) | (B & C1) -> (B & C0|C1) | A
In some scenarios like byte reverse on half word, we can see this pattern multiple times and this conversion can optimize these patterns.
Differential Revision: https://reviews.llvm.org/D124119
More information about the All-commits
mailing list