[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
Mon Apr 1 10:43:17 PDT 2024


================
@@ -15238,16 +15238,18 @@ static SDValue isScalarToVec(SDValue Op) {
 // On little endian, that's just the corresponding element in the other
 // half of the vector. On big endian, it is in the same half but right
 // justified rather than left justified in that half.
-static void fixupShuffleMaskForPermutedSToV(SmallVectorImpl<int> &ShuffV,
-                                            int LHSMaxIdx, int RHSMinIdx,
-                                            int RHSMaxIdx, int HalfVec,
-                                            unsigned ValidLaneWidth,
-                                            const PPCSubtarget &Subtarget) {
+static void fixupShuffleMaskForPermutedSToV(
+    SmallVectorImpl<int> &ShuffV, int LHSFirstElt, int LHSLastElt,
+    int RHSFirstElt, int RHSLastElt, int HalfVec, unsigned LHSNumValidElts,
+    unsigned RHSNumValidElts, const PPCSubtarget &Subtarget) {
   for (int i = 0, e = ShuffV.size(); i < e; i++) {
----------------
redstar wrote:

Sorry,  a nit: according to the coding standard, [variable names should be uppercase](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly). In addition, [preincrement is preferred](https://llvm.org/docs/CodingStandards.html#prefer-preincrement):
 ```suggestion
  for (int I = 0, E = ShuffV.size(); I < E; ++I) {
```

https://github.com/llvm/llvm-project/pull/80784


More information about the llvm-commits mailing list