OSDN Git Service

[x86] allow more shuffle splitting to avoid vpermps (PR40434)
authorSanjay Patel <spatel@rotateright.com>
Mon, 28 Jan 2019 15:51:34 +0000 (15:51 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 28 Jan 2019 15:51:34 +0000 (15:51 +0000)
commit8dc93a81b4f88bb94b794a3a773acbe7e9c807ac
treeb05047ea462111e328a34d5a1466541b72477dfd
parentb82ad43d420e376e09a4072587cccc9555459292
[x86] allow more shuffle splitting to avoid vpermps (PR40434)

This is tricky to make optimal: sometimes we're better off using
a single wider op, but other times it makes more sense to combine
a narrow ops to achieve the same result.

This solves the case from:
https://bugs.llvm.org/show_bug.cgi?id=40434

There's potentially a similar change for vectors with 64-bit elements,
but it needs adjustments similar to rL352333 to avoid creating infinite
loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352380 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-256-v8.ll
test/CodeGen/X86/vector-shuffle-512-v16.ll