llvm-project/llvm/lib/Transforms
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
..
AggressiveInstCombine Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
Coroutines [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Hello Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IPO HotColdSplitting: invalidate the AssumptionCache on split 2019-09-23 22:23:01 +00:00
InstCombine [InstCombine] Fold a shifty implementation of clamp-to-zero. 2019-09-24 00:15:03 +00:00
Instrumentation [AddressSanitizer] Don't dereference dyn_cast<ConstantInt> results. NFCI. 2019-09-20 20:52:21 +00:00
ObjCARC [ObjC][ARC] Skip debug instructions when computing the insert point of 2019-09-19 20:58:51 +00:00
Scalar [LSR] Silence static analyzer null dereference warnings with assertions. NFCI. 2019-09-22 17:59:24 +00:00
Utils [SLC] Convert some strndup calls to strdup calls 2019-09-23 18:20:01 +00:00
Vectorize [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!") 2019-09-23 16:25:03 +00:00
CMakeLists.txt
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00