Go to file
Craig Topper 08bd14803c [X86] Teach X86 codegen to use vector width preference to avoid promoting to 512-bit types when VLX is enabled and the preference is for a smaller size.
This change applies to places where we would turn 128/256-bit code into 512-bit in order to get a wider element type through sext/zext. Any 512-bit types that already existed in the IR/DAG will be left that way.

The width preference has no effect on codegen behavior when the target does not have AVX512 enabled. So AVX/AVX2 codegen cannot be limited via this mechanism yet.

If the preference is lower than 256 we may still use a 256 bit type to do the operation. Constraining to 128 bits makes it much more difficult to support some operations. For many of these cases we need to change element width while keeping element count constant which is easiest done by switching between 256 and 128 bit.

The preference is only obeyed when AVX512 and VLX are available. This means the preference is not obeyed for KNL, but is obeyed for SKX, Cannonlake, and Icelake. For KNL, the only way to do masked operation is on 512-bit registers so we would have to completely disable masking to obey the preference. We would also lose support for gather, scatter, ctlz, vXi64 multiplies, etc. This may change in the future, but this simplifies the initial implementation.

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

llvm-svn: 323016
2018-01-20 00:26:12 +00:00
clang [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
clang-tools-extra [clang-tidy] Adding Fuchsia checker for multiple inheritance 2018-01-19 23:59:59 +00:00
compiler-rt [TSan][MIPS] Expand sanitizer memory space to lower addresses 2018-01-20 00:06:07 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc tanpi: Port from amd_builtins 2018-01-19 18:57:22 +00:00
libcxx More P0202 constexpr-ifying in <algorithm>. This commit handles replace/replace_if/replace_copy/replace_copy_if. 2018-01-19 18:07:29 +00:00
libcxxabi [cmake] [libcxxabi] Don't print warning when tests are disabled. 2018-01-18 18:29:36 +00:00
libunwind [PPC64] Added vector registers. 2018-01-16 20:54:10 +00:00
lld Avoid divisions. 2018-01-20 00:14:16 +00:00
lldb Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
llgo
llvm [X86] Teach X86 codegen to use vector width preference to avoid promoting to 512-bit types when VLX is enabled and the preference is for a smaller size. 2018-01-20 00:26:12 +00:00
openmp Sprinkle a few <cstdlib> includes, for libomptarget sources using 2018-01-18 18:24:22 +00:00
parallel-libs
polly Change memcpy/memove/memset to have dest and source alignment attributes (Step 1). 2018-01-19 17:12:48 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.