[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();
----------------
aemerson wrote:
You can do:
```
auto &Shuffle = cast<GShuffleVector>(MI);
ArrayRef<int> OrigMask = Shuffle.getMask();
```
https://github.com/llvm/llvm-project/pull/115076
More information about the llvm-commits
mailing list