hanchenye-llvm-project/llvm
Sanjay Patel e12d734be3 [InstCombine] narrow truncated add/sub/mul with constant
Name: narrow_sub
  %sub = sub i32 C1, %x
  %r = trunc i32 %sub to i8
  =>  
  %xn = trunc i32 %x to i8
  %narrowC = trunc i32 C1 to i8
  %r = sub i8 %narrowC, %xn
 
Name: narrow_add
  %add = add i32 %x, C1
  %r = trunc i32 %add to i8
  =>  
  %xn = trunc i32 %x to i8
  %narrowC = trunc i32 C1 to i8
  %r = add i8 %xn, %narrowC
  
Name: narrow_mul
  %mul = mul i32 %x, C1
  %r = trunc i32 %mul to i8
  =>  
  %xn = trunc i32 %x to i8
  %narrowC = trunc i32 C1 to i8
  %r = mul i8 %xn, %narrowC


http://rise4fun.com/Alive/QpS

This doesn't solve PR34046 (failure to recognize rotate):
https://bugs.llvm.org/show_bug.cgi?id=34046
...but it reduces an extra complication in the description examples 
to a form that we can more easily match.

llvm-svn: 310141
2017-08-04 22:30:34 +00:00
..
bindings Update the Go bindings for r309426 (remove offset from llvm.dbg.value) 2017-07-28 22:44:44 +00:00
cmake [OCaml] Pass -D/-UNDEBUG through to ocamlc 2017-07-29 08:10:24 +00:00
docs [GlobalISel] Remove the GISelAccessor API. 2017-08-04 20:15:46 +00:00
examples Defeat another -Wunused-but-set-variable warning 2017-07-19 15:06:31 +00:00
include Remove unused include directive and un-break the module build. 2017-08-04 20:41:37 +00:00
lib [InstCombine] narrow truncated add/sub/mul with constant 2017-08-04 22:30:34 +00:00
projects
resources
runtimes [CMake] Remove redundant logic in runtimes/CMakeList.txt 2017-07-24 17:26:28 +00:00
test [InstCombine] narrow truncated add/sub/mul with constant 2017-08-04 22:30:34 +00:00
tools [pdbutil] When dumping section contribs, show the section name. 2017-08-04 21:10:04 +00:00
unittests [Support] Remove getPathFromOpenFD, it was unused 2017-08-04 17:43:49 +00:00
utils Revert "[TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true" 2017-08-04 00:25:24 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [GlobalISel] Make GlobalISel a non-optional library. 2017-08-03 21:52:25 +00:00
CODE_OWNERS.TXT Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
CREDITS.TXT Another test commit 2017-07-01 03:24:06 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00
configure
llvm.spec.in

README.txt

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.

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.