[PATCH] D73197: [x86] match concat of 128-bit high half vectors before lowering to VPERM2X128

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 07:37:42 PST 2020


spatel created this revision.
spatel added reviewers: lebedev.ri, RKSimon, craig.topper.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

shuffle (ins ?, X, C1), (ins ?, Y, C2), Mask --> concat X, Y

This is another shuffle problem seen with PR42024:
https://bugs.llvm.org/show_bug.cgi?id=42024

We have this small crack in legalization/lowering/combining/demanded that allows forming a vperm2f128 of high halves with AVX1 when we could do better by peeking through the insert_subvector nodes. AFAICT, it requires IR as shown in the diffs - much larger than legal vectors - to avoid all of the usual folds.

Another option might be to allow forming the 256-bit vperm here and then doing custom shuffle combining on that opcode.


https://reviews.llvm.org/D73197

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/x86-interleaved-access.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73197.239589.patch
Type: text/x-patch
Size: 15566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200122/a0b58e60/attachment.bin>


More information about the llvm-commits mailing list