llvm-6502/lib/Transforms/Vectorize
Benjamin Kramer 0ef0e2e6d0 LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops instead of scalar operations.
For example on x86 with SSE4.2 a <8 x i8> add reduction becomes
	movdqa	%xmm0, %xmm1
	movhlps	%xmm1, %xmm1            ## xmm1 = xmm1[1,1]
	paddw	%xmm0, %xmm1
	pshufd	$1, %xmm1, %xmm0        ## xmm0 = xmm1[1,0,0,0]
	paddw	%xmm1, %xmm0
	phaddw	%xmm0, %xmm0
	pextrb	$0, %xmm0, %edx

instead of
	pextrb	$2, %xmm0, %esi
	pextrb	$0, %xmm0, %edx
	addb	%sil, %dl
	pextrb	$4, %xmm0, %esi
	addb	%dl, %sil
	pextrb	$6, %xmm0, %edx
	addb	%sil, %dl
	pextrb	$8, %xmm0, %esi
	addb	%dl, %sil
	pextrb	$10, %xmm0, %edi
	pextrb	$14, %xmm0, %edx
	addb	%sil, %dil
	pextrb	$12, %xmm0, %esi
	addb	%dil, %sil
	addb	%sil, %dl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170439 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 18:40:20 +00:00
..
BBVectorize.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
CMakeLists.txt Add a loop vectorizer. 2012-10-17 18:25:06 +00:00
LLVMBuild.txt
LoopVectorize.cpp LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops instead of scalar operations. 2012-12-18 18:40:20 +00:00
LoopVectorize.h Teach the cost model about the optimization in r169904: Truncation of induction variables costs the same as scalar trunc. 2012-12-13 00:21:03 +00:00
Makefile
Vectorize.cpp LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size. 2012-12-12 19:29:45 +00:00