llvm-6502/test
Hal Finkel 65fafbb109 Look at shuffles of build_vectors in DAGCombiner::visitEXTRACT_VECTOR_ELT
When the loop vectorizer vectorizes code that uses the loop induction variable,
we often end up with IR like this:

  %b1 = insertelement <2 x i32> undef, i32 %v, i32 0
  %b2 = shufflevector <2 x i32> %b1, <2 x i32> undef, <2 x i32> zeroinitializer
  %i = add <2 x i32> %b2, <i32 2, i32 3>

If the add in this example is not legal (as is the case on PPC with VSX), it
will be scalarized, and we'll end up with a number of extract_vector_elt nodes
with the vector shuffle as the input operand, and that vector shuffle is fed by
one or more build_vector nodes. By the time that vector operations are
expanded, visitEXTRACT_VECTOR_ELT will not create new extract_vector_elt by
looking through the vector shuffle (to make sure that no illegal operations are
created), and so the extract_vector_elt -> vector shuffle -> build_vector is
never simplified to an operand of the build vector.

By looking at build_vectors through a shuffle we fix this particular situation,
preventing a vector from being built, only to be deconstructed again (for the
scalarized add) -- an expensive proposition when this all needs to be done via
the stack. We probably want a more comprehensive fix here where we look back
recursively through any shuffles to any build_vectors or scalar_to_vectors,
etc. but that can come later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205179 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31 11:43:19 +00:00
..
Analysis ARM64: initial backend import 2014-03-29 10:18:08 +00:00
Assembler Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
Bindings Fix the ocaml test to not create a alias to a declaration. 2014-03-12 21:20:42 +00:00
Bitcode All new elements except the last one initialized to NULL. Ideally, once parsing is complete, all elements should be non-NULL. 2014-03-27 12:08:23 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll.py: Make it py3-compatible. [PR19112] 2014-03-13 00:10:37 +00:00
CodeGen Look at shuffles of build_vectors in DAGCombiner::visitEXTRACT_VECTOR_ELT 2014-03-31 11:43:19 +00:00
DebugInfo ARM64: initial backend import 2014-03-29 10:18:08 +00:00
ExecutionEngine Ignore old JIT tests in AARch64 - CMake style 2014-02-25 09:31:00 +00:00
Feature Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
FileCheck
Instrumentation [msan] Relax the test some more. 2014-03-25 14:32:05 +00:00
Integer
JitListener
Linker Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs. 2014-03-18 02:34:58 +00:00
LTO Module: Don't rename in getOrInsertFunction() 2014-03-10 23:42:28 +00:00
MC PR18929: 2014-03-30 17:09:54 +00:00
Object [yaml2obj] Add support for ELF e_flags. 2014-03-31 09:44:05 +00:00
Other
TableGen
tools llvm-cov: Move XFAIL after the body of the test 2014-03-26 22:51:39 +00:00
Transforms [X86] Adjust cost of FP_TO_UINT v8f32->v8i32 2014-03-30 18:07:13 +00:00
Unit With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Verifier Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] check-llvm: Include "bugpoint" in dependent list. 2014-03-04 16:13:30 +00:00
lit.cfg llvm-mc: error when -compress-debug-sections is requested and zlib is not linked 2014-03-28 20:45:24 +00:00
lit.site.cfg.in
Makefile With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. 2014-02-28 16:16:51 +00:00
Makefile.tests
TestRunner.sh