Legalize G_SHUFFLE_VECTOR having destination vector length greater than
source vector length by reshaping source vectors.
Partial implementation of SelectionDAGBuilder::visitShuffleVector.
Paths
| Differential D132190
[AArch64][GlobalISel] Legalize G_SHUFFLE_VECTOR with different lengths ClosedPublic Authored by dzhidzhoev on Aug 18 2022, 5:32 PM.
Details Summary Legalize G_SHUFFLE_VECTOR having destination vector length greater than Partial implementation of SelectionDAGBuilder::visitShuffleVector.
Diff Detail
Event TimelineComment Actions
It seems like something that could be available in LegalizerHelper for targets that want to use it. I don't see why it is necessarily required for all targets. Comment Actions
In that case I wonder if this could be done as a Lower action as an intermediate step before the legalizer tries to scalarize the shuffle. Comment Actions
But on second thought, doing so would probably make the target's legalizer rules more complex since we'd have to check for non-canonical forms with the legalizer predicates. Comment Actions This is a similarly complicated case to unaligned load/store access. My plan for that is to move all the logic into a generic lower function in LegalizerHelper, possibly with different implementation helper functions. However, the generic lower pass would be reliant on calling into some kind of TargetLowering hook to make decisions based on legal masks This revision now requires changes to proceed.Nov 16 2022, 3:05 PM arsenm added inline comments.
This revision is now accepted and ready to land.Dec 13 2022, 2:19 PM This revision was landed with ongoing or failed builds.Dec 15 2022, 4:03 AM Closed by commit rG4c52fb1a5ee2: [AArch64][GlobalISel][Legalizer] Legalize G_SHUFFLE_VECTOR with different… (authored by dzhidzhoev). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions This has broken UBSAN buildbot: I reverted it locally and it passed... kda added a reverting change: rG192cc76e0be6: Revert "[AArch64][GlobalISel][Legalizer] Legalize G_SHUFFLE_VECTOR with….Dec 15 2022, 11:16 AM
Revision Contents
Diff 455747 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-shuffle-vector.mir
|
Nothing here really looks target specific, can this move to an implementation in LegalizerHelper? This looks like fewerElements to me