hanchenye-llvm-project/llvm
David Majnemer 468f670021 [InstCombine] Don't miscompile select to poison
If we have (select a, b, c), it is sometimes valid to simplify this to a
single select operand.  However, doing so is only valid if the
computation doesn't inject poison into the computation.

It might be helpful to consider the following example:
  (select (icmp ne %i, INT_MAX), (add nsw %i, 1), INT_MIN)

The select is equivalent to (add %i, 1) but not (add nsw %i, 1).

Self hosting on x86_64 revealed that this occurs very, very rarely so
bailing out is hopefully pretty reasonable.

llvm-svn: 239215
2015-06-06 02:30:43 +00:00
..
autoconf [omp] Actually provide a default OpenMP runtime -- libgomp for now. 2015-05-28 02:17:15 +00:00
bindings IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
cmake [CMake] Revert commits r238740/r238741 for embedding Windows version info. 2015-06-01 13:40:14 +00:00
docs [TableGen] Correct the documentation for 'foreach' in the Language Intro. 2015-06-06 00:44:42 +00:00
examples BrainF.cpp: Update CreateCall() according to r237624. 2015-05-19 06:50:19 +00:00
include TargetParser: Fix comments in enum(s) introduced in r239150. [-Wdocumentation] 2015-06-06 01:41:35 +00:00
lib [InstCombine] Don't miscompile select to poison 2015-06-06 02:30:43 +00:00
projects build: make libunwind a proper project 2015-04-25 01:47:39 +00:00
test [InstCombine] Don't miscompile select to poison 2015-06-06 02:30:43 +00:00
tools [dsymutil] Add support for linking the debug_frame section. 2015-06-05 23:06:11 +00:00
unittests [APInt] Remove special case for i1. 2015-06-04 18:19:13 +00:00
utils [TableGen] Rename ListInit::getSize to just 'size' to be more consistent. 2015-06-02 04:15:57 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore Ignore compile_commands.json only at the root of the tree. 2015-03-26 18:55:42 +00:00
CMakeLists.txt Revert "Include BPF target in CMake builds." 2015-06-05 15:32:38 +00:00
CODE_OWNERS.TXT Added Andrey Churbanov as the owner of the OpenMP runtime library code 2015-05-05 20:17:53 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Deprecate in-source autotools builds 2015-05-04 02:04:54 +00:00
Makefile.rules
README.txt Revert test commit at revision 233535. 2015-03-30 12:39:03 +00:00
configure [omp] Actually provide a default OpenMP runtime -- libgomp for now. 2015-05-28 02:17:15 +00:00
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're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.