LLVM backend for 6502
Go to file
Andrea Di Biagio 15d2c3fb00 [DAGCombiner] Fix wrong folding of AND dag nodes.
This patch fixes the logic in the DAGCombiner that folds an AND node according
to rule: (and (X (load V)), C) -> (X (load V))

An AND between a vector load 'X' and a constant build_vector 'C' can be folded
into the load itself only if we can prove that the AND operation is redundant.
The algorithm implemented by 'visitAND' firstly computes the splat value 'S'
from C, and then checks if S has the lower 'B' bits set (where B is the size in
bits of the vector element type). The algorithm takes into account also the
'undef' bits in the splat mask.

Unfortunately, the algorithm only worked under the assumption that the size of S
is a multiple of the vector element type. With this patch, we conservatively
avoid folding the AND if the splat bits are not compatible with the vector
element type.

Added X86 test and-load-fold.ll

Differential Revision: http://reviews.llvm.org/D8085


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231563 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-07 12:24:55 +00:00
autoconf Revert r230812. Do not break builds for no reason. 2015-02-28 19:43:20 +00:00
bindings Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith. 2015-03-05 22:55:38 +00:00
cmake Teach the LLVM CMake build how to explicitly use libc++abi when using 2015-03-07 10:30:34 +00:00
docs CodingStyle: Allow delegating ctors 2015-03-06 13:46:50 +00:00
examples Fix the build of the gold-plugin and examples. 2015-03-04 19:15:29 +00:00
include [Modules] Include the header needed for make_unique, otherwise we can't 2015-03-07 10:55:47 +00:00
lib [DAGCombiner] Fix wrong folding of AND dag nodes. 2015-03-07 12:24:55 +00:00
projects Reverse the order libc++ and libc++abi are added in CMake. 2015-03-04 01:16:43 +00:00
test [DAGCombiner] Fix wrong folding of AND dag nodes. 2015-03-07 12:24:55 +00:00
tools [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
unittests [ConstantRange] Teach multiply to be cleverer about signed ranges. 2015-03-06 15:50:47 +00:00
utils TableGen: Initialize ErrorInfo to ~0ULL in the MatchInstructionImpl 2015-03-05 19:46:55 +00:00
.arcconfig
.clang-format
.clang-tidy Enable display of compiler diagnostics in clang-tidy by default. 2014-10-29 17:29:38 +00:00
.gitignore Add one more vim swap file pattern 2015-01-30 21:59:28 +00:00
CMakeLists.txt Teach the LLVM CMake build how to explicitly use libc++abi when using 2015-03-07 10:30:34 +00:00
CODE_OWNERS.TXT [CODE_OWNERS] Change the ownership of register allocators. 2015-03-05 22:15:17 +00:00
configure Revert r230812. Do not break builds for no reason. 2015-02-28 19:43:20 +00:00
CREDITS.TXT Rise from the dead and update personal info 2014-08-25 17:51:04 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Add a check for misbehaving -Wcomment from gcc-4.7 and add 2014-11-05 00:35:15 +00:00
Makefile.rules Add support for SunOS function/data sections and associated 2015-03-03 20:54:29 +00:00
README.txt Revert test commit 2015-02-04 18:46:00 +00:00

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.