llvm-project/llvm
David Majnemer c761afd1d1 [SimplifyCFG] Don't mistake icmp of and for a tree of comparisons
SimplifyCFG tries to turn complex branch conditions into a switch.
Some of it's logic attempts to reason about bitwise arithmetic produced
by InstCombine.  InstCombine can turn things like (X == 2) || (X == 3)
into (X & 1) == 2 and so SimplifyCFG tries to detect when this occurs so
that it can produce a switch instruction.

However, the legality checking was not sufficient to determine whether
or not this had occured.  Correctly check this case by requiring that
the right-hand side of the comparison be a power of two.

This fixes PR26323.

llvm-svn: 258904
2016-01-27 02:43:28 +00:00
..
bindings Remove autoconf support 2016-01-26 21:29:08 +00:00
cmake Remove autoconf support 2016-01-26 21:29:08 +00:00
docs [docs] Fix a typo 2016-01-26 23:26:25 +00:00
examples Remove autoconf support 2016-01-26 21:29:08 +00:00
include [llvm-tblgen] Avoid StringMatcher for GCC and MS builtin names 2016-01-27 01:43:12 +00:00
lib [SimplifyCFG] Don't mistake icmp of and for a tree of comparisons 2016-01-27 02:43:28 +00:00
projects Remove autoconf support 2016-01-26 21:29:08 +00:00
resources
test [SimplifyCFG] Don't mistake icmp of and for a tree of comparisons 2016-01-27 02:43:28 +00:00
tools Remove autoconf support 2016-01-26 21:29:08 +00:00
unittests Fix identify_magic() to check that a file that starts with MH_MAGIC is 2016-01-26 23:43:37 +00:00
utils Add "/dev/tty" as a special file name for lit tests. 2016-01-27 01:48:20 +00:00
.arcconfig
.clang-format
.clang-tidy adding readability-identifier-naming to llvm clang-tidy configuration. 2015-12-08 17:44:51 +00:00
.gitignore
CMakeLists.txt [GlobalISel] Add the proper cmake plumbing. 2016-01-20 20:58:56 +00:00
CODE_OWNERS.TXT The PS4 baton passes. 2015-12-19 20:04:03 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt Revert previous test commit. 2016-01-04 19:13:29 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +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 are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.