[PATCH] D25651: [AVX-512] Teach isel lowering that a subvector broadcast being inserted into both halves of a 512-bit vector can be combined into a larger subvector broadcast.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 15 22:32:22 PDT 2016


craig.topper created this revision.
craig.topper added reviewers: RKSimon, delena, igorb.
craig.topper added a subscriber: llvm-commits.

This allows us to create broadcasts of 128-bit vector loads into 512-bit vectors.

New patterns added to support 8-bit and 16-bit vector types and v2f64/v2i64->v8f64/v8i64 without DQI instructions.

There also fallback patterns when the load can't be folded. These patterns are a little complex as we first need to insert the lower 128-bits into the second 128-bits using a zmm subvector insert instruction. We need to use a zmm insert in case VLX isn't available. Then use another zmm sub vector insert to take those 256-bits and insert them into the upper bits. Since we used a zmm insert to create the 256-bits we also need to do a extract_subreg to get just the lower 256-bits to pass to the second insert.

The outer insert for the fallback patterns should have its type correct because eventually we should also supported masked operations here too. So we need a DQI and a NoDQI version of the v16f32/v16i32 patterns.


https://reviews.llvm.org/D25651

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrAVX512.td
  test/CodeGen/X86/avx512-vbroadcasti128.ll
  test/CodeGen/X86/subvector-broadcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25651.74783.patch
Type: text/x-patch
Size: 28260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161016/c852e5fa/attachment.bin>


More information about the llvm-commits mailing list