[PATCH] D90674: [GlobalISel] Expand combine for (x & mask) -> x when (x & mask) == x
Mirko Brkusanin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 02:51:49 PST 2020
mbrkusanin created this revision.
mbrkusanin added reviewers: foad, arsenm, paquette.
mbrkusanin added a project: LLVM.
Herald added subscribers: kerbowa, hiraditya, rovka, nhaehnle, jvesely.
mbrkusanin requested review of this revision.
Herald added a subscriber: wdng.
We can use KnownBitsAnalysis to cover cases when mask is not trivial. It can
also help with cases when mask is not constant but can still be folded into
one. Since 'and' is commutative we should treat both operands as possible
replacements.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90674
Files:
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/Target/AArch64/AArch64Combine.td
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-and-redundant.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-of-shifted-logic.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90674.302527.patch
Type: text/x-patch
Size: 10957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201103/e139e86b/attachment.bin>
More information about the llvm-commits
mailing list