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.
Differential D134635
[AMDGPU][GlobalISel] Add Shift/Shufflevector Combine Pierre-vh on Sep 26 2022, 3:55 AM. Authored by
Details
Diff Detail
Event TimelineComment 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
Comment Actions Comments
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
Comment Actions Not the right kind of fix + too controversial of a change for a relatively small regression in mad_mix GISel. |
Should break up this comment to avoid wrapping the pattern bit