https://godbolt.org/z/h8ejrG4hb
rdar://83597585
Paths
| Differential D111839
[AArch64][GlobalISel] combine and + [la]sr => ubfx ClosedPublic Authored by jroelofs on Oct 14 2021, 2:22 PM.
Details
Diff Detail
Event TimelineHerald added subscribers: hiraditya, kristof.beyls, rovka. · View Herald TranscriptOct 14 2021, 2:22 PM This revision is now accepted and ready to land.Oct 14 2021, 6:21 PM Comment Actions I don't think there are any cases where it is beneficial to combine ashr (and x, n), k -> sbfx (are there?), because for any case where you can do that, it would be better just to remove the and and leave it as an ashr. This revision now requires changes to proceed.Oct 15 2021, 2:15 AM Comment Actions
... and that should be done by a general demanded bits analysis, which could spot that the and is redundant. Comment Actions
Great point! Thanks for catching that. jroelofs retitled this revision from [AArch64][GlobalISel] combine and + [la]sr => [su]bfx to [AArch64][GlobalISel] combine and + [la]sr => ubfx. This revision is now accepted and ready to land.Oct 18 2021, 12:38 AM Closed by commit rG1300677f976e: [AArch64][GlobalISel] combine and + [la]sr => ubfx (authored by jroelofs). · Explain WhyOct 18 2021, 10:42 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 380470 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/form-bitfield-extract-from-shr-and.mir
llvm/test/CodeGen/AArch64/GlobalISel/merge-stores-truncating.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/bswap.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.ubfe.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/lshr.ll
|
No need for this variable.