llvm-project/llvm
Sanjay Patel 341623653d [SDAG] match rotate pattern with extra 'or' operation
This is another fold generalized from D111530.
We can find a common source for a rotate operation hidden inside an 'or':
https://alive2.llvm.org/ce/z/9pV8hn

Deciding when this is profitable vs. a funnel-shift is tricky, but this
does not show any regressions: if a target has a rotate but it does not
have a funnel-shift, then try to form the rotate here. That is why we
don't have x86 test diffs for the scalar tests that are duplicated from
AArch64 ( 74a65e3834 ) - shld/shrd are available. That also makes it
difficult to show vector diffs - the only case where I found a diff was
on x86 AVX512 or XOP with i64 elements.

There's an additional check for a legal type to avoid a problem seen
with x86-32 where we form a 64-bit rotate but then it gets split
inefficiently. We might avoid that by adding more rotate folds, but
I didn't check to see what is missing on that path.

This gets most of the motivating patterns for AArch64 / ARM that are in
D111530.

We still need a couple of enhancements to setcc pattern matching with
rotate/funnel-shift to get the rest.

Differential Revision: https://reviews.llvm.org/D120933
2022-03-09 13:19:00 -05:00
..
benchmarks
bindings [SanitizerBounds] Add support for NoSanitizeBounds function 2022-03-01 18:47:02 +01:00
cmake [cmake] Use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES 2022-03-08 15:25:03 -08:00
docs Add the C and C++ Language Working Group meeting info 2022-03-09 10:19:06 -05:00
examples [examples][BuildingAJIT] Use the right layer when adding code in Chapter 3. 2022-03-01 16:44:55 -08:00
include [mlir][OpenMP] Generating enums in accordance with the guidelines 2022-03-09 20:10:45 +05:30
lib [SDAG] match rotate pattern with extra 'or' operation 2022-03-09 13:19:00 -05:00
projects
resources
runtimes Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
test [SDAG] match rotate pattern with extra 'or' operation 2022-03-09 13:19:00 -05:00
tools [llvm-dwarfdump] Avoid possible div-by-zero in debug output 2022-03-09 18:03:26 +04:00
unittests [mlir][OpenMP] Generating enums in accordance with the guidelines 2022-03-09 20:10:45 +05:30
utils [gn build] (manually) port ffb9429b6f 2022-03-09 11:43:21 -05:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT [CODE_OWNERS/CREDITS] Update my email address 2022-03-07 10:53:29 +00:00
CREDITS.TXT [CODE_OWNERS/CREDITS] Update my email address 2022-03-07 10:53:29 +00:00
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.