llvm-6502/test
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
..
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen [DAGCombiner] Fix wrong folding of AND dag nodes. 2015-03-07 12:24:55 +00:00
DebugInfo Use the existing begin and end symbol for debug info. 2015-03-05 02:05:42 +00:00
ExecutionEngine
Feature
FileCheck
Instrumentation [sanitizer] add nosanitize metadata to more coverage instrumentation instructions 2015-03-05 01:20:05 +00:00
Integer
JitListener
Linker Remember to move a type to the correct set when setting the body. 2015-03-06 00:50:21 +00:00
LTO
MC [AsmPrinter][TLOF] Remove AArch64 test to appease buildbots 2015-03-06 19:42:18 +00:00
Object
Other
SymbolRewriter
TableGen
tools [dsymutil] Apply relocations to DIE data before cloning. 2015-03-07 01:25:09 +00:00
Transforms Do not restrict interleaved unrolling to small loops, depending on the target. 2015-03-06 23:12:04 +00:00
Unit
Verifier Replace llvm.frameallocate with llvm.frameescape 2015-03-05 18:26:34 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh