OSDN Git Service

[SelectionDAG][X86] Improve legalization of v32i1 CONCAT_VECTORS of v16i1 for AVX512F.
authorCraig Topper <craig.topper@intel.com>
Thu, 14 Dec 2017 08:25:58 +0000 (08:25 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 14 Dec 2017 08:25:58 +0000 (08:25 +0000)
commit10d4fa74b4031718c9066b97c91b4a2a544baa0f
tree50919feaf2553bc22b7769302e359ded65a7922c
parent557f3cf7a5406da5be51a5ff6b0ac1b76af2308c
[SelectionDAG][X86] Improve legalization of v32i1 CONCAT_VECTORS of v16i1 for AVX512F.

A v32i1 CONCAT_VECTORS of v16i1 uses promotion to v32i8 to legalize the v32i1. This results in a bunch of extract_vector_elts and a build_vector that ultimately gets scalarized.

This patch checks to see if v16i8 is legal and inserts a any_extend to that so that we can concat v16i8 to v32i8 and avoid creating the extracts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320674 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/avx512-vec-cmp.ll
test/CodeGen/X86/avx512vl-vec-masked-cmp.ll
test/CodeGen/X86/bitcast-and-setcc-512.ll
test/CodeGen/X86/bitcast-setcc-512.ll
test/CodeGen/X86/vector-compare-results.ll