llvm-6502/lib
Chris Lattner 96908b17ae generalize the previous check to handle -1 on either side of the
select, inserting a not to compensate.  Add a missing isZero check
that I lost somehow.

This improves codegen of:

void *func(long count) {
      return new int[count];
}

from:

__Z4funcl:                              ## @_Z4funcl
	movl	$4, %ecx                ## encoding: [0xb9,0x04,0x00,0x00,0x00]
	movq	%rdi, %rax              ## encoding: [0x48,0x89,0xf8]
	mulq	%rcx                    ## encoding: [0x48,0xf7,0xe1]
	testq	%rdx, %rdx              ## encoding: [0x48,0x85,0xd2]
	movq	$-1, %rdi               ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff]
	cmoveq	%rax, %rdi              ## encoding: [0x48,0x0f,0x44,0xf8]
	jmp	__Znam                  ## TAILCALL
                                        ## encoding: [0xeb,A]

to:

__Z4funcl:                              ## @_Z4funcl
	movl	$4, %ecx                ## encoding: [0xb9,0x04,0x00,0x00,0x00]
	movq	%rdi, %rax              ## encoding: [0x48,0x89,0xf8]
	mulq	%rcx                    ## encoding: [0x48,0xf7,0xe1]
	cmpq	$1, %rdx                ## encoding: [0x48,0x83,0xfa,0x01]
	sbbq	%rdi, %rdi              ## encoding: [0x48,0x19,0xff]
	notq	%rdi                    ## encoding: [0x48,0xf7,0xd7]
	orq	%rax, %rdi              ## encoding: [0x48,0x09,0xc7]
	jmp	__Znam                  ## TAILCALL
                                        ## encoding: [0xeb,A]



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-05 02:00:51 +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 generalize the previous check to handle -1 on either side of the 2010-12-05 02:00:51 +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