Folds G_LSHR + G_SHUFFLEVECTOR away when the shift amount
is 1/2 of the destination scalar size, and the mask starts with 1.
Depends on D134870.
Paths
| Differential D134635
[AMDGPU][GlobalISel] Add Shift/Shufflevector Combine AbandonedPublic Authored by Pierre-vh on Sep 26 2022, 3:55 AM.
Details
Diff Detail
Event TimelinePierre-vh added a child revision: D134354: [AMDGPU][GlobalISel] Support mad/fma_mix selection.Sep 26 2022, 3:55 AM Comment Actions Another thing worth thinking about is whether we should really be using legal vector_shuffle at all. The DAG path doesn't use it. Given that we have such a restricted set of shuffles (only 0, 1), it may still make sense to keep lowering to simple BUILD_VECTORs with 2 elements
Comment Actions I haven't touched the legalization of G_SHUFFLE_VECTOR I think
Pierre-vh marked 3 inline comments as done. Comment ActionsComments
Pierre-vh added a child revision: D134793: [AMDGPU] Update `mad-mix*` CodeGen tests.Sep 27 2022, 11:50 PM Comment Actions Also note using legal shuffle_vector is a difference from the DAG we could go back on. Ultimately it's probably fewer total combines to only have to think about 16-bit shifts
Pierre-vh removed a child revision: D134793: [AMDGPU] Update `mad-mix*` CodeGen tests.Sep 29 2022, 12:11 AM Pierre-vh added a child revision: D134354: [AMDGPU][GlobalISel] Support mad/fma_mix selection.Sep 29 2022, 12:13 AM Pierre-vh removed a child revision: D134354: [AMDGPU][GlobalISel] Support mad/fma_mix selection.Sep 29 2022, 1:12 AM
Pierre-vh added a parent revision: D134870: [AMDGPU][GISel] Combine V2S16 G_EXTRACT/INSERT_VECTOR_ELT. Pierre-vh added a child revision: D134857: [GISel] Add more cases to isKnownNeverNaN.Sep 29 2022, 3:49 AM Comment Actions Not the right kind of fix + too controversial of a change for a relatively small regression in mad_mix GISel. Pierre-vh removed a child revision: D134857: [GISel] Add more cases to isKnownNeverNaN.Sep 30 2022, 4:57 AM Pierre-vh removed a parent revision: D134870: [AMDGPU][GISel] Combine V2S16 G_EXTRACT/INSERT_VECTOR_ELT. Pierre-vh added a child revision: D134857: [GISel] Add more cases to isKnownNeverNaN.Sep 30 2022, 5:31 AM Pierre-vh removed a child revision: D134857: [GISel] Add more cases to isKnownNeverNaN.Sep 30 2022, 5:33 AM
Revision Contents
Diff 463780 llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
llvm/lib/Target/AMDGPU/AMDGPUCombine.td
llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-trunc-shift-shufflevector.mir
|
Should break up this comment to avoid wrapping the pattern bit