[llvm] [GISel][AMDGPU] Expand ShuffleVector (PR #124527)
Alan Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 06:44:47 PST 2025
================
@@ -384,6 +384,71 @@ void CombinerHelper::applyCombineConcatVectors(
MI.eraseFromParent();
}
+bool CombinerHelper::matchCombineShuffle(MachineInstr &MI) const {
+ assert(MI.getOpcode() == TargetOpcode::G_SHUFFLE_VECTOR &&
+ "Invalid instruction");
+ auto &Shuffle = cast<GShuffleVector>(MI);
+
+ auto SrcVec1 = Shuffle.getSrc1Reg();
+ int SrcVec2 = Shuffle.getSrc2Reg();
+
+ LLT SrcVec1Type = MRI.getType(SrcVec1);
+ LLT SrcVec2Type = MRI.getType(SrcVec2);
+ if (!SrcVec1Type.isVector() || !SrcVec2Type.isVector()) {
+ return false;
+ }
+
+ /*
----------------
lialan wrote:
My bad for forgetting to remove them.
https://github.com/llvm/llvm-project/pull/124527
More information about the llvm-commits
mailing list