[llvm] [PowerPC] Fix vector_shuffle combines when inputs are scalar_to_vector of differing types. (PR #80784)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 12:22:12 PDT 2024
================
@@ -15686,6 +15690,50 @@ static SDValue getSToVPermuted(SDValue OrigSToV, SelectionDAG &DAG,
OrigSToV.getOperand(0));
}
+static bool isShuffleMaskInRange(const SmallVectorImpl<int> &ShuffV,
+ int HalfVec, int LHSLastElementDefined,
+ int RHSLastElementDefined) {
+ for (int I : seq<int>(0, ShuffV.size())) {
+ int Index = ShuffV[I];
----------------
redstar wrote:
`I` is only used to get the element out of `ShuffV`. That can be done easier:
```suggestion
for (int Index : ShuffV) {
```
https://github.com/llvm/llvm-project/pull/80784
More information about the llvm-commits
mailing list