Only do this post-legalization for now
This is generic now.
Paths
| Differential D99283
[GlobalISel] Combine and (lshr x, cst), mask -> ubfx x, cst, width ClosedPublic Authored by paquette on Mar 24 2021, 10:56 AM.
Details Summary
This is generic now.
Diff Detail
Unit TestsFailed
Event Timelinepaquette added a parent revision: D99230: [GlobalISel] Combine G_SEXT_INREG + right shift -> G_SBFX.Mar 24 2021, 10:57 AM Comment Actions Rebase + move to AArch64-only to match the G_SBFX combine. Maybe this can be cannibalized into something more generic.
Comment Actions
(Maybe there should be a m_UICst(...) matcher or something...?)
Comment Actions LGTM
This revision is now accepted and ready to land.May 29 2021, 3:56 PM Closed by commit rGe7f501b5e7db: [GlobalISel][AArch64] Combine and (lshr x, cst), mask -> ubfx x, cst, width (authored by paquette). · Explain WhyJun 1 2021, 11:02 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 345197 llvm/lib/Target/AArch64/AArch64Combine.td
llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
llvm/test/CodeGen/AArch64/GlobalISel/form-bitfield-extract-from-and.mir
|
This is the only target specific thing here which can be replaced with a legality check on UBFX