llvm-project/llvm
Sanjay Patel 8c0cd77bff [DAG] add undef simplifications for select nodes
Sadly, this duplicates (twice) the logic from InstSimplify. There
might be some way to at least share the DAG versions of the code, 
but copying the folds seems to be the standard method to ensure 
that we don't miss these folds. 

Unlike in IR, we don't run DAGCombiner to fixpoint, so there's no 
way to ensure that we do these kinds of simplifications unless the 
code is repeated at node creation time and during combines.

There were other tests that would become worthless with this
improvement that I changed as pre-commits:
rL347161
rL347164
rL347165
rL347166
rL347167

I'm not sure how to salvage the remaining tests (diffs in this patch).
So the x86 tests verify that the new code is working as intended.
The AMDGPU test is actually similar to my motivating case: we have
some undef value that has survived to machine IR in an x86 test, and 
then it gets folded in some weird way, or we crash if we don't transfer
the undef flag. But we would have been better off never getting to that
point by doing these simplifications.

This will lead back to PR32023 someday...
https://bugs.llvm.org/show_bug.cgi?id=32023

llvm-svn: 347170
2018-11-18 17:36:23 +00:00
..
benchmarks
bindings [bindings/go] Add Go bindings to LLVMGetIndices 2018-11-08 04:04:04 +00:00
cmake Swap order of discovering of -ltinfo and -lterminfo 2018-11-18 12:13:51 +00:00
docs Reverted r347092 due to the following build fails: 2018-11-17 02:26:34 +00:00
examples Add bracket that was lost in rL346727 and has been causing buildbot failures for some time. 2018-11-13 11:28:46 +00:00
include [WebAssembly] Add equality comparison operators for WasmEventType 2018-11-18 11:53:35 +00:00
lib [DAG] add undef simplifications for select nodes 2018-11-18 17:36:23 +00:00
projects
resources
runtimes
test [DAG] add undef simplifications for select nodes 2018-11-18 17:36:23 +00:00
tools [llvm-objdump] Print a blank row at the end of sections 2018-11-17 08:12:48 +00:00
unittests [VFS] Update unittest to fix Windows buildbot. 2018-11-16 02:20:33 +00:00
utils Add initial scaffolding for the GN build. 2018-11-17 02:21:53 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore [git/svn] Ignore Visual Studio's CMakeSettings.json. 2018-10-29 14:51:02 +00:00
CMakeLists.txt [CMake] Accept ENTITLEMENTS in add_llvm_executable and llvm_codesign 2018-11-16 18:10:36 +00:00
CODE_OWNERS.TXT
CREDITS.TXT It's a test commit, which is my first commit and also add my name to CREDITS.TXT 2018-11-06 03:07:03 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT Adding Yvan as release test backup for Diana 2018-11-08 11:51:27 +00:00
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.