llvm-project/llvm
Sanjay Patel b5b6aa4d53 [InstCombine] fold multiply by signbit-splat to cmp+select
(ashr i32 X, 31) * C --> (X < 0) ? -C : 0
https://alive2.llvm.org/ce/z/G8u9SS

With a constant operand, this is an improvement in IR
and codegen (where it can be converted to a mask op).

Without a constant operand, we would have to negate
the operand, so that is probably better left to the backend.

This is similar but not the same optimization that is requested
in #55618.
2022-05-27 11:54:19 -04:00
..
benchmarks
bindings
cmake Use cmake Python3_EXECUTABLE variable instead of hardcoding 2022-05-26 14:48:45 -07:00
docs [Doc][OpenCL] Misc wording improvements for SPIR-V 2022-05-27 11:13:06 +01:00
examples [ORC][examples] Fix off-by-one error when handling null terminators. 2022-05-20 19:33:49 -07:00
include Revert "[llvm][clang][bolt][NFC] Use llvm::less_first() when applicable" 2022-05-27 11:19:18 +02:00
lib [InstCombine] fold multiply by signbit-splat to cmp+select 2022-05-27 11:54:19 -04:00
projects
resources
runtimes Revert "[runtimes] Detect changes to Tests.cmake" 2022-05-26 09:34:18 -07:00
test [InstCombine] fold multiply by signbit-splat to cmp+select 2022-05-27 11:54:19 -04:00
tools Revert "[llvm][clang][bolt][NFC] Use llvm::less_first() when applicable" 2022-05-27 11:19:18 +02:00
unittests [ADT] Explicitly delete copy/move constructors and operator= in IntervalMap 2022-05-26 07:58:18 -07:00
utils [workflow] Don't fail workflow if we already have a PR for an issue 2022-05-27 16:02:39 +02:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Generalize "check-all" umbrella targets, use for check-clang-tools 2022-05-06 12:30:49 +02: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.