]> granicus.if.org Git - llvm/commit
[X86] Bitcast subvector before broadcasting it.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 10 Feb 2017 19:51:47 +0000 (19:51 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 10 Feb 2017 19:51:47 +0000 (19:51 +0000)
commitd0491a6b5624e2a166ea48650f8df6d95aa06774
tree8a1a6eebbfbf16eb4325391ccc7f75c76ed86294
parent0aa6910479cfc868667f3a926edf8d52dd91974d
[X86] Bitcast subvector before broadcasting it.

Since r274013, we've been looking through bitcasts on broadcast inputs.
In the scalar-folding case (from a load, build_vector, or sc2vec),
the input type didn't matter, as we'd simply bitcast the resulting
scalar back.

However, when broadcasting a 128-bit-lane-aligned element, we create an
EXTRACT_SUBVECTOR.  Use proper types, by creating an extract_subvector
of the original input type.

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