[PATCH] D34601: [X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 02:44:13 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.h:1457
+ /// succeed.
+ template <typename T>
+ void scaleShuffleMask(int Scale, ArrayRef<T> Mask,
----------------
DavidKreitzer wrote:
> Did you want to have T default to int as you did for createUnpackShuffleMask? That will avoid the extra changes in X86ISelLowering.cpp.
>
+1
================
Comment at: lib/Target/X86/X86InterleavedAccess.cpp:175
+// Low = true: mask generated for the shuffle
+// shufle(VEC1,VEC2,{0,1,2,...,NumElement/2-1,NumElement,
+// NumElement+1...,NumElement+NumElement/2-1})
----------------
shuffle
================
Comment at: lib/Target/X86/X86InterleavedAccess.cpp:188
+ }
+}
+
----------------
I think you could make this much simpler to understand:
```
int NumHalfElements = NumElement / 2;
int Offset = Low ? 0 : NumHalfElements;
for (int i = 0; i < NumHalfElements; ++i)
Mask.push_back(i + Offset);
for (int i = 0; i < NumHalfElements; ++i)
Mask.push_back(i + Offset + NumElements);
```
https://reviews.llvm.org/D34601
More information about the llvm-commits
mailing list