llvm-project/llvm
Kerry McLaughlin a7512401e5 [LV] Prevent vectorization with unsupported element types.
This patch adds a TTI function, isElementTypeLegalForScalableVector, to query
whether it is possible to vectorize a given element type. This is called by
isLegalToVectorizeInstTypesForScalable to reject scalable vectorization if
any of the instruction types in the loop are unsupported, e.g:

  int foo(__int128_t* ptr, int N)
    #pragma clang loop vectorize_width(4, scalable)
    for (int i=0; i<N; ++i)
      ptr[i] = ptr[i] + 42;

This example currently crashes if we attempt to vectorize since i128 is not a
supported type for scalable vectorization.

Reviewed By: sdesmalen, david-arm

Differential Revision: https://reviews.llvm.org/D102253
2021-07-06 13:06:21 +01:00
..
benchmarks
bindings
cmake [cmake] Invoke strip without -l and with non-grouped flags. 2021-07-01 13:37:58 -07:00
docs [AMDGPU] Set optional PAL metadata 2021-07-06 11:58:00 +02:00
examples [Orc] At CBindings for LazyRexports 2021-07-01 21:52:05 +02:00
include [LV] Prevent vectorization with unsupported element types. 2021-07-06 13:06:21 +01:00
lib [LV] Prevent vectorization with unsupported element types. 2021-07-06 13:06:21 +01:00
projects [RFC][debuginfo-test] Rename debug-info lit tests for general purposes 2021-06-28 11:31:40 +01:00
resources
runtimes
test [LV] Prevent vectorization with unsupported element types. 2021-07-06 13:06:21 +01:00
tools [llvm-strings] Switch command line parsing from llvm::cl to OptTable 2021-07-05 10:46:17 -07:00
unittests Unpack the CostEstimate feature in ML inlining models. 2021-07-02 16:57:16 +00:00
utils [gn build] (manually) port 98f078324f (llvm-strings Opts.td) 2021-07-05 14:43:05 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [RFC][debuginfo-test] Rename debug-info lit tests for general purposes 2021-06-28 11:31:40 +01:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

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

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.