1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib
Chris Lattner 19a5dc488b optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x'
is a vector to be a vector element extraction.  This allows clang to
compile:

struct S { float A, B, C, D; };
float foo(struct S A) { return A.A + A.B+A.C+A.D; }

into:

_foo:                                   ## @foo
## BB#0:                                ## %entry
	movd	%xmm0, %rax
	shrq	$32, %rax
	movd	%eax, %xmm2
	addss	%xmm0, %xmm2
	movapd	%xmm1, %xmm3
	addss	%xmm2, %xmm3
	movd	%xmm1, %rax
	shrq	$32, %rax
	movd	%eax, %xmm0
	addss	%xmm3, %xmm0
	ret

instead of:

_foo:                                   ## @foo
## BB#0:                                ## %entry
	movd	%xmm0, %rax
	movd	%eax, %xmm0
	shrq	$32, %rax
	movd	%eax, %xmm2
	addss	%xmm0, %xmm2
	movd	%xmm1, %rax
	movd	%eax, %xmm1
	addss	%xmm2, %xmm1
	shrq	$32, %rax
	movd	%eax, %xmm0
	addss	%xmm1, %xmm0
	ret

... eliminating half of the horribleness.

llvm-svn: 112227
2010-08-26 21:55:42 +00:00
..
Analysis In the default address space, any GEP off of null results in a trap value if you try to load it. Thus, 2010-08-25 01:16:47 +00:00
Archive Eliminate some unnessary Path::exists() calls. 2010-05-27 20:51:54 +00:00
AsmParser Add a comment explaining why this code doesn't just call 2010-08-24 14:35:45 +00:00
Bitcode Add a FIXME comment. 2010-08-25 20:23:38 +00:00
CodeGen Speculatively revert r112207. 2010-08-26 20:33:42 +00:00
CompilerDriver Add a TODO. 2010-08-23 19:24:12 +00:00
ExecutionEngine remove some dead code. 2010-08-23 03:12:06 +00:00
Linker Reapply r112091 and r111922, support for metadata linking, with a 2010-08-26 15:41:53 +00:00
MC MCELF: Fix a thinko of mine. 2010-08-26 18:12:04 +00:00
Support StringRef::compare_numeric also differed from StringRef::compare for characters > 127. 2010-08-26 15:25:35 +00:00
System Fix --disable-threads build, PR7949. 2010-08-20 20:54:37 +00:00
Target Turn off the scavenging based frame reg reuse briefly to measure whether it's 2010-08-26 21:29:54 +00:00
Transforms optimize bitcast(trunc(bitcast(x))) where the result is a float and 'x' 2010-08-26 21:55:42 +00:00
VMCore Don't include the is-function-local bit in the FoldingSetNodeID 2010-08-24 23:21:12 +00:00
Makefile