Go to file
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
clang [OPENMP] Fix PR38902: support ADL for declare reduction constructs. 2018-09-12 16:31:59 +00:00
clang-tools-extra Fix MSVC "not all control paths return a value" warnings. NFCI. 2018-09-12 12:56:58 +00:00
compiler-rt [hwasan] On every use-after-free print a developer note: the index of this heap object in the thread's deallocation ring buffer. Mostly useful to hwasan developers, will hopefully let us know the good size of the deallocation ring buffer 2018-09-12 00:58:15 +00:00
debuginfo-tests Revert "(Retry) Add a basic integration test for C++ smart pointers" 2018-08-20 19:53:33 +00:00
libclc amdgcn: Use __constant AS for amdgcn builtins. 2018-08-03 15:14:08 +00:00
libcxx Update the failure annotations for the uncaught_exceptions test. The underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1. 2018-09-12 16:59:09 +00:00
libcxxabi Port my recent changes from LLVM copy of the demangler: 2018-08-24 23:30:26 +00:00
libunwind [CMake] Don't use -rtlib=compiler-rt with -nodefaultlibs. 2018-09-04 20:57:50 +00:00
lld [ELF] Revert "Also demote lazy symbols." 2018-09-11 23:00:36 +00:00
lldb Add compatibility version to liblldb in framework builds 2018-09-12 18:10:22 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [InstCombine] Inefficient pattern for high-bits checking (PR38708) 2018-09-12 18:19:43 +00:00
openmp [OPENMP]Increment iterator when the loop is continued. 2018-09-11 17:16:26 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [ScopDetection] Use addUnknown for calls in the AliasSetTracker. 2018-09-11 23:48:14 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.