llvm-6502/lib
Manman Ren 05324ab015 This patch teaches the DAGCombiner how to fold insert_subvector nodes
when the input is a concat_vectors and the insert replaces one of the
concat halves:

Lower half: fold (insert_subvector (concat_vectors X, Y), Z) ->
(concat_vectors Z, Y)
Upper half: fold (insert_subvector (concat_vectors X, Y), Z) ->
(concat_vectors X, Z)

This can be seen with the following IR:

define <8 x float> @lower_half(<4 x float> %v1, <4 x float> %v2, <4 x
float> %v3) {
  %1 = shufflevector <4 x float> %v1, <4 x float> %v2, <8 x i32> <i32
0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %2 = tail call <8 x float> @llvm.x86.avx.vinsertf128.ps.256(<8 x
float> %1, <4 x float> %v3, i8 0)

The vinsertf128 intrinsic is converted into an insert_subvector node
in SelectionDAGBuilder.cpp.

Using AVX, without the patch this generates two vinsertf128 instructions:

vinsertf128 $1, %xmm1, %ymm0, %ymm0
vinsertf128 $0, %xmm2, %ymm0, %ymm0

With the patch this is optimized into:

vinsertf128 $1, %xmm1, %ymm2, %ymm0

Patch by Robert Lougher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200506 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31 01:10:35 +00:00
..
Analysis Allow speculating llvm.sqrt, fma and fmuladd 2014-01-31 00:09:00 +00:00
AsmParser Add an inalloca flag to allocas 2014-01-17 23:58:17 +00:00
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen This patch teaches the DAGCombiner how to fold insert_subvector nodes 2014-01-31 01:10:35 +00:00
DebugInfo Simplify the handling of iterators in ObjectFile. 2014-01-30 02:49:50 +00:00
ExecutionEngine Simplify the handling of iterators in ObjectFile. 2014-01-30 02:49:50 +00:00
IR Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
IRReader Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
Linker Reapply r194218 with fix: 2014-01-16 06:29:36 +00:00
LTO Change MCStreamer EmitInstruction interface to take subtarget info 2014-01-28 23:12:42 +00:00
MC Fix PR18381 - print a minimal diagnostic rather than assert on unresolved .secidx target 2014-01-30 21:13:05 +00:00
Object Only ELF has a dynamic symbol table. Remove it from ObjectFile. 2014-01-30 20:45:33 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support [CommandLine] Aliases require an value if their target requires a value. 2014-01-29 18:54:17 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
Target [x86] Fix signed relocations for i64i32imm operands 2014-01-30 22:20:41 +00:00
Transforms [LPM] Fix PR18643, another scary place where loop transforms failed to 2014-01-29 13:16:53 +00:00
CMakeLists.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
LLVMBuild.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
Makefile Reformat Makefile. No other changes. 2013-10-30 04:03:03 +00:00