llvm-project/llvm
Huihui Zhang 8952199715 [InstCombine] Fold a shifty implementation of clamp-to-zero.
Summary:
Fold
and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
into
X s> Y ? X : 0

https://rise4fun.com/Alive/lFH

Fold shift into select enables more optimization,
e.g., vmax generation for ARM target.

Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

Reviewed By: lebedev.ri

Subscribers: xbolva00, andreadb, craig.topper, RKSimon, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 372676
2019-09-24 00:15:03 +00:00
..
benchmarks
bindings Remove the obsolete BlockByRefStruct flag from LLVM IR 2019-09-18 22:38:56 +00:00
cmake [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library 2019-09-23 14:11:48 +00:00
docs Revert "Reland "[utils] Implement the llvm-locstats tool"" 2019-09-23 11:04:11 +00:00
examples [Orc] Roll back ThreadPool to std::function 2019-09-13 11:59:51 +00:00
include [IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or VectorType) 2019-09-23 18:21:33 +00:00
lib [InstCombine] Fold a shifty implementation of clamp-to-zero. 2019-09-24 00:15:03 +00:00
projects
resources
runtimes Revert "Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds." 2019-09-11 00:43:35 +00:00
test [InstCombine] Fold a shifty implementation of clamp-to-zero. 2019-09-24 00:15:03 +00:00
tools [llvm-lipo] Add support for archives 2019-09-23 22:22:55 +00:00
unittests [TextAPI] Add New Supported Platforms 2019-09-23 15:28:02 +00:00
utils [TableGen] Emit OperandType enums for RegisterOperands/RegisterClasses 2019-09-23 18:51:00 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore
CMakeLists.txt Revert "Reland "[utils] Implement the llvm-locstats tool"" 2019-09-23 11:04:11 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.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.