[PATCH] D54271: [x86] use shuffles for scalar insertion into high elements of a constant vector

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 10:37:31 PST 2018


spatel created this revision.
spatel added reviewers: RKSimon, craig.topper.
Herald added a subscriber: mcrosier.

As discussed in https://reviews.llvm.org/D54073, we have a potential regression from more aggressive vector narrowing here, so let's try to avoid that by changing build-vector lowering slightly.

Insert-vector-element lowering always does this since there's no "pinsr" for ymm/zmm:

  // If the vector is wider than 128 bits, extract the 128-bit subvector, insert
  // into that, and then insert the subvector back into the result.

...but we can sometimes do better for insert-into-constant-vector by using shuffle lowering.


https://reviews.llvm.org/D54271

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/insert-into-constant-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54271.173192.patch
Type: text/x-patch
Size: 9084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181108/636e2ffb/attachment.bin>


More information about the llvm-commits mailing list