llvm-6502/lib
Chris Lattner 3ddcc43040 fix the BuildVector -> unpcklps logic to not do pointless shuffles
when the top elements of a vector are undefined.  This happens all
the time for X86-64 ABI stuff because only the low 2 elements of
a 4 element vector are defined.  For example, on:

_Complex float f32(_Complex float A, _Complex float B) {
  return A+B;
}

We used to produce (with SSE2, SSE4.1+ uses insertps):

_f32:                                   ## @f32
	movdqa	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	pshufd	$16, %xmm2, %xmm2
	pshufd	$1, %xmm1, %xmm1
	pshufd	$1, %xmm0, %xmm0
	addss	%xmm1, %xmm0
	pshufd	$16, %xmm0, %xmm1
	movdqa	%xmm2, %xmm0
	unpcklps	%xmm1, %xmm0
	ret

We now produce:

_f32:                                   ## @f32
	movdqa	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	pshufd	$1, %xmm1, %xmm1
	pshufd	$1, %xmm0, %xmm3
	addss	%xmm1, %xmm3
	movaps	%xmm2, %xmm0
	unpcklps	%xmm3, %xmm0
	ret

This implements rdar://8368414


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 17:28:30 +00:00
..
Analysis Fix an index calculation thinko. 2010-08-28 00:39:27 +00:00
Archive
AsmParser remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
Bitcode remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
CodeGen remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
CompilerDriver
ExecutionEngine
Linker
MC squish dead code. 2010-08-28 03:21:03 +00:00
Support StringRef::compare_numeric also differed from StringRef::compare for characters > 127. 2010-08-26 15:25:35 +00:00
System Don't cast Win32 FILETIME structs to int64. Patch by Dimitry Andric! 2010-08-28 16:39:32 +00:00
Target fix the BuildVector -> unpcklps logic to not do pointless shuffles 2010-08-28 17:28:30 +00:00
Transforms remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
VMCore remove unions from LLVM IR. They are severely buggy and not 2010-08-28 04:09:24 +00:00
Makefile