If we have a mask, and a value x, where (x | mask) == x, we can drop the OR
and just use x.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D90952
[GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x ClosedPublic Authored by mbrkusanin on Nov 6 2020, 8:50 AM.
Details Summary If we have a mask, and a value x, where (x | mask) == x, we can drop the OR
Diff Detail
Event TimelineHerald added subscribers: kerbowa, hiraditya, rovka and 2 others. · View Herald TranscriptNov 6 2020, 8:50 AM mbrkusanin added a parent revision: D90674: [GlobalISel] Expand combine for (x & mask) -> x when (x & mask) == x.Nov 6 2020, 8:51 AM This revision is now accepted and ready to land.Nov 9 2020, 2:05 AM Closed by commit rGa75d6178b809: [GlobalISel] Add combine for (x | mask) -> x when (x | mask) == x (authored by mbrkusanin). · Explain WhyNov 10 2020, 2:38 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 304118 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-or-redundant.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-of-shifted-logic.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll
|
matchRedundantOr?