OSDN Git Service

[X86] Always consider inserting a vXi1 vector into the lsbs of a zero vector to be...
authorCraig Topper <craig.topper@intel.com>
Fri, 8 Dec 2017 08:10:58 +0000 (08:10 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 8 Dec 2017 08:10:58 +0000 (08:10 +0000)
commitdb8960471a1d964c2a9b81acac748a208483102b
tree46e702ffb54b5b0e029d7c2d824720b45c65657f
parent94240acddc937163335dbd919f2d6833bd9079b0
[X86] Always consider inserting a vXi1 vector into the lsbs of a zero vector to be legal during lowering. Add isel patterns to emit shifts.

Previously we only allowed these through if the subvector came from a compare or test instruction which we would again check for during isel.

With this change we only check for the compare and test instructions during isel and have fallback patterns that emit the shifts if needed.

I noticed that in a lot of cases we don't actually see the compare during lowering and rely on an odd legalization of concat_vectors with a zero vector as the second argument. This keeps the concat_vectors around long enough for a later dag combine to expose the compare then we re-legalize the concat_vectors and catch the compare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320134 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrVecCompiler.td