[llvm] [GISel][AMDGPU] Expand ShuffleVector (PR #124527)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 00:46:50 PST 2025
================
@@ -384,6 +384,45 @@ 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);
+ return (SrcVec1Type.isVector() && SrcVec2Type.isVector());
----------------
arsenm wrote:
Extra parens
https://github.com/llvm/llvm-project/pull/124527
More information about the llvm-commits
mailing list