[PATCH] D26802: [X86][AVX512] Detect repeated constant patterns in BUILD_VECTOR suitable for broadcasting.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 07:28:17 PST 2016


aymanmus added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:6107-6108
+      MVT PVT = TLI.getPointerTy(DAG.getDataLayout());
+      if (Subtarget.hasAVX2()) {
+        if (SplatBitSize <= 32 || (Subtarget.is64Bit() && SplatBitSize <= 64)) {
+          // Splatted value can fit in one constant in constant pool.
----------------
spatel wrote:
> If you cast the SplatValue to an APFloat, can you expand the target check to 'hasAVX()' and remove the is64Bit() restriction?
AVX have no 16bit broadcast (float or int), so we will miss the cases where splatValue is of size 16. 


https://reviews.llvm.org/D26802





More information about the llvm-commits mailing list