llvm-project/llvm/lib/Transforms
Roman Lebedev 75404fb9f8 [InstCombine] Inefficient pattern for high-bits checking (PR38708)
Summary:
It is sometimes important to check that some newly-computed value
is non-negative and only `n` bits wide (where `n` is a variable.)
There are **many** ways to check that:
https://godbolt.org/z/o4RB8D
The last variant seems best?
(I'm sure there are some other variations i haven't thought of..)

Let's handle the second variant first, since it is much simpler.
https://rise4fun.com/Alive/LYjY

https://bugs.llvm.org/show_bug.cgi?id=38708

Reviewers: spatel, craig.topper, RKSimon

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 342067
2018-09-12 18:19:43 +00:00
..
AggressiveInstCombine [Aggressive InstCombine] Move C bindings to their own header file. 2018-09-05 11:41:12 +00:00
Coroutines [IR] Replace `isa<TerminatorInst>` with `isTerminator()`. 2018-08-26 09:51:22 +00:00
Hello
IPO Revert "[GVNHoist] Re-enable GVNHoist by default" 2018-09-11 22:10:57 +00:00
InstCombine [InstCombine] Inefficient pattern for high-bits checking (PR38708) 2018-09-12 18:19:43 +00:00
Instrumentation Revert "[SanitizerCoverage] Create comdat for global arrays." 2018-09-11 21:15:41 +00:00
ObjCARC ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache. 2018-06-21 05:14:00 +00:00
Scalar [GVNHoist] computeInsertionPoints() miscalculates IDF 2018-09-12 14:28:23 +00:00
Utils [SimplifyCFG] Put an alignment on generated switch tables 2018-09-12 09:54:17 +00:00
Vectorize [LV] Move InterleaveGroup and InterleavedAccessInfo to VectorUtils.h (NFC) 2018-09-12 08:01:57 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00