[llvm] [GlobalISel] Remove references to rhs of shufflevector if rhs is undef (PR #115076)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 23:54:14 PST 2024
================
@@ -7721,3 +7721,32 @@ bool CombinerHelper::matchUnmergeValuesAnyExtBuildVector(const MachineInstr &MI,
return false;
}
+
+bool CombinerHelper::matchShuffleUndefRHS(MachineInstr &MI,
+ BuildFnTy &MatchInfo) {
+
+ bool Changed = false;
+ ArrayRef<int> OrigMask = MI.getOperand(3).getShuffleMask();
+ SmallVector<int, 8> NewMask;
+ const LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
----------------
aemerson wrote:
And likewise: `MRI.getType(Shuffle.getSrc1Reg())`
https://github.com/llvm/llvm-project/pull/115076
More information about the llvm-commits
mailing list