llvm-project/llvm
Roman Lebedev 4d8e47ca18
[InstCombine] Sink sub into hands of select if one hand becomes zero (PR44426)
This decreases use count of %Op1, makes one hand of select to be 0,
and possibly exposes further folding potential.

Name: sub (select %Cond, %Op1, %FalseVal), %Op1 -> select %Cond, 0, (sub %FalseVal, %Op1)
  %Op1 = %TrueVal
  %o = select i1 %Cond, i8 %Op1, i8 %FalseVal
  %r = sub i8 %o, %Op1
=>
  %n = sub i8 %FalseVal, %Op1
  %r = select i1 %Cond, i8 0, i8 %n

Name: sub (select %Cond, %TrueVal, %Op1), %Op1 -> select %Cond, (sub %TrueVal, %Op1), 0
  %Op1 = %FalseVal
  %o = select i1 %Cond, i8 %TrueVal, i8 %Op1
  %r = sub i8 %o, %Op1
=>
  %n = sub i8 %TrueVal, %Op1
  %r = select i1 %Cond, i8 %n, i8 0

https://rise4fun.com/Alive/avL

https://bugs.llvm.org/show_bug.cgi?id=44426
2020-01-04 17:30:51 +03:00
..
benchmarks
bindings [bindings/go] Add Subprogram method 2020-01-03 22:17:46 +01:00
cmake build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
docs Generalize the pass registration mechanism used by Polly to any third-party tool 2020-01-02 16:45:31 +01:00
examples Add intrinsics_gen *dependency* on Bye example 2020-01-02 17:16:48 +01:00
include Revert "[gicombiner] Add GIMatchTree and use it for the code generation" 2020-01-03 18:17:00 -08:00
lib [InstCombine] Sink sub into hands of select if one hand becomes zero (PR44426) 2020-01-04 17:30:51 +03:00
projects
resources
runtimes [llvm/runtimes] Add runtimes as a dependency of clang-bootstrap-deps 2019-12-16 16:58:15 -08:00
test [InstCombine] Sink sub into hands of select if one hand becomes zero (PR44426) 2020-01-04 17:30:51 +03:00
tools [Remarks] Warn if a remark file is not found when processing static archives 2020-01-03 17:02:10 -08:00
unittests build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00
utils [gn build] Port 5d304d68dd 2020-01-04 02:17:36 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt build: disable zlib by default on Windows 2020-01-02 12:55:52 -08:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
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.