Go to file
David Bolvansky dbcdad51ff [InstCombine] (1 << (C - x)) -> ((1 << C) >> x) if C is bitwidth - 1
Summary:
```
%a = sub i32 31, %x
%r = shl i32 1, %a
  =>
%d = shl i32 1, 31
%r = lshr i32 %d, %x

Done: 1
Optimization is correct!
```

https://rise4fun.com/Alive/btZm

Reviewers: spatel, lebedev.ri, nikic

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 364073
2019-06-21 16:25:32 +00:00
clang [OpenCL][PR41963] Add generic addr space to old atomics in C++ mode 2019-06-21 16:19:16 +00:00
clang-tools-extra [clangd] Add include-mapping for C symbols. 2019-06-21 13:32:18 +00:00
compiler-rt [asan] Avoid two compiler-synthesized calls to memset & memcpy 2019-06-21 16:15:09 +00:00
debuginfo-tests Store a pointer to the return value in a static alloca and let the debugger use that 2019-06-20 17:15:21 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx Use rvalue references throughout the is_constructible traits. 2019-06-21 15:35:33 +00:00
libcxxabi [demangle] Special case clang's creative mangling of __uuidof expressions. 2019-06-18 23:34:09 +00:00
libunwind [libunwind][AArch64] Fix libunwind::Registers_arm64::jumpto 2019-06-17 11:00:21 +00:00
lld lld/elf: Deduplicate undefined symbol diagnostics 2019-06-20 18:25:57 +00:00
lldb [lldb] [Process] Introduce common helpers to split/recombine YMM data 2019-06-21 13:19:34 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [InstCombine] (1 << (C - x)) -> ((1 << C) >> x) if C is bitwidth - 1 2019-06-21 16:25:32 +00:00
openmp [OpenMP][libomptarget] Add support for declare target to clause under unified memory 2019-06-19 15:48:10 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [test] Add wrap flags after D61934. 2019-06-17 19:17:07 +00:00
pstl [pstl] Default to the serial backend when unspecified 2019-06-20 17:56:51 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

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