diff options
author | Craig Topper <craig.topper@intel.com> | 2018-03-02 23:27:50 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-03-02 23:27:50 +0000 |
commit | dbf75c9c79910f8b99b2a273d886d8db3ff9b93e (patch) | |
tree | d9c65654013b5f9073185a48070e7a014c5dc215 /lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py | |
parent | 702c14fd7954c1dfbf2bf156d99dfe36ac2920ba (diff) | |
download | bcm5719-llvm-dbf75c9c79910f8b99b2a273d886d8db3ff9b93e.tar.gz bcm5719-llvm-dbf75c9c79910f8b99b2a273d886d8db3ff9b93e.zip |
[LegalizeVectorTypes] When scalarizing the operand of a unary op like TRUNC, use a SCALAR_TO_VECTOR rather than a single element BUILD_VECTOR to convert back to a vector type.
X86 considers v1i1 a legal type under AVX512 and as such a truncate from a v1iX type to v1i1 can be turned into a scalar truncate plus a conversion to v1i1. We would much prefer a v1i1 SCALAR_TO_VECTOR over a one element BUILD_VECTOR.
During lowering we were detecting the v1i1 BUILD_VECTOR as a splat BUILD_VECTOR like we try to do for v2i1/v4i1/etc. In this case we create (select i1 splat_elt, v1i1 all-ones, v1i1 all-zeroes). That goes through some more legalization and we end up with a CMOV choosing between 0 and 1 in scalar and a scalar_to_vector.
Arguably we could detect the v1i1 BUILD_VECTOR and do this better in X86 target code. But just using a SCALAR_TO_VECTOR in legalization is much easier.
llvm-svn: 326637
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py')
0 files changed, 0 insertions, 0 deletions