llvm-project/llvm
Sanjay Patel 4a47f5f550 [InstCombine] fold adds of constants separated by sext/zext
This is part of a transform that may be done in the backend:
D13757
...but it should always be beneficial to fold this sooner in IR
for all targets.

https://rise4fun.com/Alive/vaiW

  Name: sext add nsw
  %add = add nsw i8 %i, C0
  %ext = sext i8 %add to i32
  %r = add i32 %ext, C1
  =>
  %s = sext i8 %i to i32
  %r = add i32 %s, sext(C0)+C1

  Name: zext add nuw
  %add = add nuw i8 %i, C0
  %ext = zext i8 %add to i16
  %r = add i16 %ext, C1
  =>
  %s = zext i8 %i to i16
  %r = add i16 %s, zext(C0)+C1

llvm-svn: 355118
2019-02-28 19:05:26 +00:00
..
benchmarks
bindings [bindings/go] Fix building on 32-bit systems (ARM etc.) 2019-02-16 22:33:10 +00:00
cmake CMake: Fix stand-alone clang builds since r353268 2019-02-20 01:11:05 +00:00
docs Update docs of memcpy/move/set wrt. align and len 2019-02-26 18:53:13 +00:00
examples [Kaleidoscope] Fix symbol resolver to search in reverse order. 2019-02-21 16:53:04 +00:00
include Add support for computing "zext of value" in KnownBits. NFCI 2019-02-28 15:45:29 +00:00
lib [InstCombine] fold adds of constants separated by sext/zext 2019-02-28 19:05:26 +00:00
projects
resources
runtimes [CMake][runtimes] Set clang-header dependency for builtins 2019-02-20 23:06:10 +00:00
test [InstCombine] fold adds of constants separated by sext/zext 2019-02-28 19:05:26 +00:00
tools [dsymutil] Use rfind for paths with parentheses 2019-02-28 18:46:04 +00:00
unittests Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
utils Fixed typos in a test: s/CEHCK/CHECK/ 2019-02-28 10:58:13 +00:00
.arcconfig
.clang-format
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitattributes
.gitignore [clangd] Store index in '.clangd/index' instead of '.clangd-index' 2019-02-20 19:08:06 +00:00
CMakeLists.txt [CMake] Honor LLVM_EXTERNAL_<proj>_SOURCE_DIR 2019-02-22 21:19:48 +00:00
CODE_OWNERS.TXT
CREDITS.TXT [NFC] Add to contributor list. 2019-02-26 05:46:45 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt Testing commit access 2019-02-19 20:38:51 +00:00
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

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.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.