[PATCH] D143785: [X86] Add Extend shuffle pattern to vNf32 shuffles.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 04:14:19 PST 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:16939
+
+ if (SimpleOnly && (UseHiV1 || UseHiV2))
+ return false;
----------------
SimpleOnly is guaranteed to be true here
Maybe just `return !(UseHiV1 || UseHiV2);`
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:17210
+ int Size = Mask.size();
+ int LaneSize = Size / 2;
+ InLaneMask = SmallVector<int>(Mask);
----------------
Don't hardcode the LaneSize calculation - it prevents us using for other vector sizes in the future.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:17211
+ int LaneSize = Size / 2;
+ InLaneMask = SmallVector<int>(Mask);
+ for (int i = 0; i < Size; ++i) {
----------------
InLaneMask.assign(Mask.begin(), Mask.end());
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:18410
+ {
+ SmallVector<int> InLaneMask;
----------------
Move if(!Subtarget.hasAVX2()) up here to avoid unnecessary computeInLaneShuffleMask calls
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143785/new/
https://reviews.llvm.org/D143785
More information about the llvm-commits
mailing list