[PATCH] D15477: [X86][AVX] Only shuffle the lower half of vectors if the upper half is undefined
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 00:26:55 PST 2015
delena added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10363
@@ +10362,3 @@
+ if ((M % NumElts) >= HalfNumElts)
+ break;
+
----------------
You can exit from function in this case. I mean "return SDValue()", right?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10378
@@ +10377,3 @@
+ }
+ break;
+ }
----------------
Do you leave the loop at this point?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:11189
@@ +11188,3 @@
+ // Handle special cases where the lower or upper half is UNDEF.
+ if (SDValue V = lowerVectorShuffleWithUndefHalf(DL, VT, V1, V2, Mask, DAG))
+ return V;
----------------
I'm not sure that that is a beneficial variant for AVX-512.
Some reasons:
- AVX-512 has many additional shuffles, we plan to add more patterns in the future
- In KNL target (no VLX, BWI, DQ) you are moving down to AVX2, we have less registers, less shuffles.
- SKX (withVLX, BWI, DQ) supports 256-bit vectors, but we currently don't have any additional optimization for 256-bit vectors on SKX.
Repository:
rL LLVM
http://reviews.llvm.org/D15477
More information about the llvm-commits
mailing list