llvm-project/llvm
David Bolvansky 420cbb6190 [InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y))
Summary:
```
Name: sub(xor(x, y), or(x, y)) -> neg(and(x, y))
%or = or i32 %y, %x
%xor = xor i32 %x, %y
%sub = sub i32 %xor, %or
  =>
%sub1 = and i32 %x, %y
%sub = sub i32 0, %sub1

Optimization: sub(xor(x, y), or(x, y)) -> neg(and(x, y))
Done: 1
Optimization is correct!
```

https://rise4fun.com/Alive/8OI

Reviewers: lebedev.ri

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 370945
2019-09-04 18:03:21 +00:00
..
benchmarks
bindings Bump llvm-go to C++14 2019-08-15 10:55:25 +00:00
cmake [cmake] Remove MSVC C4180 override 2019-09-04 10:26:39 +00:00
docs [llvm-profdata] Add mode to recover from profile read failures 2019-09-03 22:23:16 +00:00
examples [ORCv2] - New Speculate Query Implementation 2019-08-27 18:23:36 +00:00
include Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format. 2019-09-04 17:32:51 +00:00
lib [InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y)) 2019-09-04 18:03:21 +00:00
projects [libc++] Take 2: Integrate the PSTL into libc++ 2019-08-05 18:29:14 +00:00
resources
runtimes
test [InstCombine] sub(xor(x, y), or(x, y)) -> neg(and(x, y)) 2019-09-04 18:03:21 +00:00
tools Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI. 2019-09-04 12:51:40 +00:00
unittests Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format. 2019-09-04 17:32:51 +00:00
utils GlobalISel/TableGen: Don't skip REG_SEQUENCE based on patterns 2019-09-04 16:19:34 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert Autogenerate the shebang lines for tools/opt-viewer 2019-08-27 18:31:29 +00: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.