Go to file
Sanjay Patel d2025a2e31 [AggressiveInstCombine] convert a chain of 'or-shift' bits into masked compare
and (or (lshr X, C), ...), 1 --> (X & C') != 0

I initially thought about implementing the minimal pattern in instcombine as mentioned here:
https://bugs.llvm.org/show_bug.cgi?id=37098#c6

...but we need to do better to catch the more general sequence from the motivating test 
(more than 2 bits in the compare). And a test-suite run with statistics showed that this 
pattern only happened 2 times currently. It would potentially happen more often if 
reassociation worked better (D45842), but it's probably still not too frequent?

This is small enough that I didn't see a need to create a whole new class/file within 
AggressiveInstCombine. There are likely other relatively small matchers like what was 
discussed in D44266 that would slide under foldUnusualPatterns() (name suggestions welcome). 
We could potentially also consolidate matchers for ctpop, bswap, etc under here.

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

llvm-svn: 331311
2018-05-01 21:02:09 +00:00
clang [libclang] Fix the type of 'int (Foo);' 2018-05-01 20:45:25 +00:00
clang-tools-extra [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals 2018-05-01 18:46:32 +00:00
compiler-rt [libFuzzer] Report at most one crash per input. 2018-05-01 21:01:53 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc relational/select: Condition types for half are short/ushort, not char/uchar 2018-04-25 17:36:36 +00:00
libcxx Fix return type of isinf(double) and isnan(double) where possible. 2018-05-01 03:05:40 +00:00
libcxxabi Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system 2018-04-29 23:05:11 +00:00
libunwind [cmake] Remove duplicate command line options from build 2018-04-05 20:27:50 +00:00
lld Fix warning: result of 32-bit shift implicitly converted to 64 bits - NFC 2018-04-30 14:37:28 +00:00
lldb Revert "[lit] Replace generator expressions in lit.site.cfg" 2018-05-01 17:08:09 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [AggressiveInstCombine] convert a chain of 'or-shift' bits into masked compare 2018-05-01 21:02:09 +00:00
openmp [OpenMP][OMPT] Fix api_calls_from_other_thread.cpp 2018-04-30 18:46:31 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Remove keep/take/give from isl C++ bindings 2018-04-29 00:57:43 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

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.