llvm-6502/test
Chandler Carruth ffc97a6ae1 [slp] Fix a nasty bug in the SLP vectorizer that Joerg pointed out.
Apparently some code finally started to tickle this after my
canonicalization changes to instcombine.

The bug stems from trying to form a vector type out of scalars that
aren't compatible at all. In this example, from x86_mmx values. The code
in the vectorizer that checks for reasonable types whas checking for
aggregates or vectors, but there are lots of other types that should
just never reach the vectorizer.

Debugging this was made more confusing by the lie in an assert in
VectorType::get() -- it isn't that the types are *primitive*. The types
must be integer, pointer, or floating point types. No other types are
allowed.

I've improved the assert and added a helper to the vectorizer to handle
the element type validity checks. It now re-uses the VectorType static
function and then further excludes weird target-specific types that we
probably shouldn't be touching here (x86_fp80 and ppc_fp128). Neither of
these are really reachable anyways (neither 80-bit nor 128-bit things
will get vectorized) but it seems better to just eagerly exclude such
nonesense.

I've added a test case, but while it definitely covers two of the paths
through this code there may be more paths that would benefit from test
coverage. I'm not familiar enough with the SLP vectorizer to synthesize
test cases for all of these, but was able to update the code itself by
inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-12 02:30:56 +00:00
..
Analysis Adding support for llvm.eh.begincatch and llvm.eh.endcatch intrinsics and beginning the documentation of native Windows exception handling. 2015-02-10 19:52:43 +00:00
Assembler AsmParser: Validate alloca's type 2015-02-11 09:13:11 +00:00
Bindings
Bitcode
BugPoint
CodeGen [PowerPC] Mark jumps as expensive (using using CR bits) 2015-02-12 01:02:52 +00:00
DebugInfo Add the missing testcase for r228764. 2015-02-10 23:32:56 +00:00
ExecutionEngine
Feature Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO
MC MC, COFF: Align section contents to a four byte boundary 2015-02-11 22:22:30 +00:00
Object
Other Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
SymbolRewriter
TableGen
tools Gold-plugin: Broaden scope of get/release_input_file to scope of Module. 2015-02-11 16:12:50 +00:00
Transforms [slp] Fix a nasty bug in the SLP vectorizer that Joerg pointed out. 2015-02-12 02:30:56 +00:00
Unit
Verifier Verifier: Check for null operands in !llvm.module.flags 2015-02-11 09:13:06 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh