[CodeGen] Update min-legal-vector width based on function argument and return types
authorCraig Topper <craig.topper@intel.com>
Wed, 24 Oct 2018 17:42:17 +0000 (17:42 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 24 Oct 2018 17:42:17 +0000 (17:42 +0000)
commit3113ec3dc78e027fcfeef54a62d117c9d566d4f1
treed21d09bba9f9e202f5b3395f55b2e244c490139b
parent618c0bc363033a2a9d4a3f2b1a0c09c4703e4e55
[CodeGen] Update min-legal-vector width based on function argument and return types

This is a continuation of my patches to inform the X86 backend about what the largest IR types are in the function so that we can restrict the backend type legalizer to prevent 512-bit vectors on SKX when -mprefer-vector-width=256 is specified if no explicit 512 bit vectors were specified by the user.

This patch updates the vector width based on the argument and return types of the current function and from the types of any functions it calls. This is intended to make sure the backend type legalizer doesn't disturb any types that are required for ABI.

Differential Revision: https://reviews.llvm.org/D52441

llvm-svn: 345168
17 files changed:
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/test/CodeGen/aarch64-neon-3v.c
clang/test/CodeGen/aarch64-neon-across.c
clang/test/CodeGen/aarch64-neon-fma.c
clang/test/CodeGen/aarch64-neon-ldst-one.c
clang/test/CodeGen/aarch64-neon-scalar-copy.c
clang/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
clang/test/CodeGen/aarch64-neon-tbl.c
clang/test/CodeGen/aarch64-neon-vget.c
clang/test/CodeGen/aarch64-poly64.c
clang/test/CodeGen/arm-neon-fma.c
clang/test/CodeGen/arm-neon-numeric-maxmin.c
clang/test/CodeGen/arm-neon-vcvtX.c
clang/test/CodeGen/arm64_vdupq_n_f64.c
clang/test/CodeGen/x86-vector-width.c [new file with mode: 0644]
clang/test/CodeGenOpenCL/fpmath.cl