1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib
Chris Lattner 474ed0aa9b Improve an integer select optimization in two ways:
1. generalize 
    (select (x == 0), -1, 0) -> (sign_bit (x - 1))
to:
    (select (x == 0), -1, y) -> (sign_bit (x - 1)) | y

2. Handle the identical pattern that happens with !=:
   (select (x != 0), y, -1) -> (sign_bit (x - 1)) | y

cmov is often high latency and can't fold immediates or
memory operands.  For example for (x == 0) ? -1 : 1, before 
we got:

< 	testb	%sil, %sil
< 	movl	$-1, %ecx
< 	movl	$1, %eax
< 	cmovel	%ecx, %eax

now we get:

> 	cmpb	$1, %sil
> 	sbbl	%eax, %eax
> 	orl	$1, %eax

llvm-svn: 120929
2010-12-05 01:23:24 +00:00
..
Analysis Also inore '()' while creating mdnode name from ObjC symbol name. 2010-12-03 23:40:45 +00:00
Archive Merge System into Support. 2010-11-29 18:16:10 +00:00
AsmParser Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-op 2010-10-25 15:37:09 +00:00
Bitcode Generalize the darwin wrapper hack to work with generic macho triples as well as darwin ones. 2010-11-29 23:29:54 +00:00
CodeGen Remove PHIElimination's private copy of SkipPHIsAndLabels. 2010-12-04 20:40:15 +00:00
CompilerDriver Now to chant the magical incantation that will exorcise the System library 2010-11-29 19:44:50 +00:00
ExecutionEngine Remove unneeded zero arrays. 2010-12-04 15:28:22 +00:00
Linker Merge System into Support. 2010-11-29 18:16:10 +00:00
MC Once the layout is done we don't need to keep updating which fragments are 2010-12-04 22:47:22 +00:00
Object Merge System into Support. 2010-11-29 18:16:10 +00:00
Support Silence 'may be used uninitialized in this function' warnings. Static analysis 2010-12-04 20:20:34 +00:00
Target Improve an integer select optimization in two ways: 2010-12-05 01:23:24 +00:00
Transforms PR5207: Rename overloaded APInt methods set(), clear(), flip() to 2010-12-01 08:53:58 +00:00
VMCore Remove unneeded zero arrays. 2010-12-04 15:28:22 +00:00
Makefile Add LLVMObject Library. 2010-11-15 03:21:41 +00:00