llvm-project/llvm/lib
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
..
Analysis [MemorySSA] Update Phi insertion. 2019-09-23 23:50:16 +00:00
AsmParser [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
BinaryFormat [BinaryFormat] Teach identify_magic about Tapi files. 2019-08-21 21:00:16 +00:00
Bitcode Add AutoUpgrade function to add new address space datalayout string to existing datalayouts. 2019-09-18 22:15:58 +00:00
Bitstream [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
CodeGen [GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned. 2019-09-24 00:09:23 +00:00
DebugInfo [Object] Extend MachOUniversalBinary::getObjectForArch 2019-09-19 00:02:12 +00:00
Demangle llvm-undname: Add support for demangling typeinfo names 2019-09-23 13:13:37 +00:00
ExecutionEngine [ExecutionEngine] Don't dereference a dyn_cast result. NFCI. 2019-09-16 15:19:11 +00:00
FuzzMutate [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Fuzzer
IR [Alignment][NFC] Migrate Instructions to Align 2019-09-23 14:23:37 +00:00
IRReader
LTO [LTO][Legacy] Add new C inferface to query libcall functions 2019-09-16 18:49:54 +00:00
LineEditor [CMake] Delete redundant DEPENDS/LINK_LIBS from LineEditor/XRay 2019-06-22 01:50:21 +00:00
Linker [IRMover] Don't map globals if their types are the same 2019-09-11 18:35:49 +00:00
MC [Alignment] Introduce llvm::Align to MCSection 2019-09-13 09:29:59 +00:00
MCA [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCI 2019-08-27 18:20:34 +00:00
Object Support for 64-bit PC-relative relocations for X86_64 2019-09-21 01:37:14 +00:00
ObjectYAML [yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported. 2019-09-20 09:15:36 +00:00
Option [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Passes [Unroll] Add an option to control complete unrolling 2019-09-19 06:57:29 +00:00
ProfileData Recommit [SampleFDO] Expose an interface to return the size of a section 2019-09-21 17:23:55 +00:00
Remarks [Remarks] Allow remarks::Format::YAML to take a string table 2019-09-16 22:45:17 +00:00
Support [SystemZ] Support z15 processor name 2019-09-20 23:04:45 +00:00
TableGen [TableGen] Skip CRLF conversion when writing output 2019-09-11 22:33:50 +00:00
Target Fix uninitialized variable warning. NFCI. 2019-09-23 21:32:38 +00:00
Testing [Testing] Move clangd::Annotations to llvm testing support 2019-04-25 10:08:31 +00:00
TextAPI [TextAPI] Add New Supported Platforms 2019-09-23 15:28:02 +00:00
ToolDrivers [llvm-dlltool] Handle external and internal names with differing decoration 2019-09-02 13:28:16 +00:00
Transforms [InstCombine] Fold a shifty implementation of clamp-to-zero. 2019-09-24 00:15:03 +00:00
WindowsManifest Fight a bit against global initializers. NFC. 2019-08-22 19:43:27 +00:00
XRay [XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI. 2019-09-22 18:47:00 +00:00
CMakeLists.txt Fix build errors LLVM tests are disabled. 2019-07-11 22:08:35 +00:00
LLVMBuild.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00