[PATCH] D22460: [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 06:17:51 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: craig.topper, delena, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

As reported on PR26235, we don't currently make use of the VBROADCASTF128/VBROADCASTI128 instructions to load+splat a 128-bit vector to both lanes of a 256-bit vector.

This patch enables lowering from subvector insertion/concatenation patterns and auto-upgrades the llvm.x86.avx.vbroadcastf128.pd.256 / llvm.x86.avx.vbroadcastf128.ps.256 intrinsics to match.

Once this is in place I can update _mm256_broadcast_ps and _mm256_broadcast_pd in the headers to use generic IR and remove the clang builtins.

We could possibly investigate using VBROADCASTF128/VBROADCASTI128 to load repeated constants as well (similar to how we already do for scalar broadcasts).

Repository:
  rL LLVM

https://reviews.llvm.org/D22460

Files:
  lib/IR/AutoUpgrade.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrSSE.td
  test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll
  test/CodeGen/X86/avx-intrinsics-x86.ll
  test/CodeGen/X86/avx-vbroadcastf128.ll
  test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
  test/CodeGen/X86/avx2-vbroadcasti128.ll
  test/CodeGen/X86/vector-shuffle-256-v4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22460.64310.patch
Type: text/x-patch
Size: 23175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/ba8f2ccf/attachment.bin>


More information about the llvm-commits mailing list