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
..
2010-01-12 18:29:23 +00:00
2009-09-23 18:20:27 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-11-27 20:43:02 +00:00
2009-11-18 21:33:35 +00:00
2009-11-26 00:35:01 +00:00
2010-02-13 02:06:10 +00:00
2010-02-15 22:03:29 +00:00
2010-09-21 20:50:32 +00:00
2010-07-13 18:14:47 +00:00
2010-10-11 21:08:42 +00:00
2010-03-03 00:35:56 +00:00
2010-11-30 09:23:54 +00:00
2010-11-29 22:34:55 +00:00
2010-04-17 16:29:15 +00:00
2010-10-08 05:12:30 +00:00
2010-07-16 22:51:10 +00:00
2010-07-10 22:42:12 +00:00
2010-04-17 03:43:36 +00:00
2010-05-08 04:47:54 +00:00
2010-08-30 18:12:35 +00:00
2010-06-14 20:19:03 +00:00
2010-04-17 16:29:15 +00:00
2010-04-17 16:29:15 +00:00
2009-11-11 07:11:02 +00:00
2009-11-11 07:11:02 +00:00
2009-11-11 07:11:02 +00:00
2010-01-12 04:52:47 +00:00
2010-03-10 03:07:41 +00:00
2010-10-07 20:56:25 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-10-05 21:58:12 +00:00
2010-10-01 05:08:18 +00:00
2010-09-30 23:57:10 +00:00
2010-09-30 23:57:10 +00:00
2010-04-04 19:28:59 +00:00
2010-03-25 20:01:07 +00:00
2010-09-17 22:28:18 +00:00
2010-03-10 07:07:45 +00:00
2010-01-05 17:55:26 +00:00
2010-04-28 01:53:13 +00:00
2010-04-28 01:53:13 +00:00
2009-12-16 00:53:11 +00:00
2010-04-28 01:53:13 +00:00
2010-12-02 20:17:34 +00:00
2010-01-19 21:51:51 +00:00
2010-06-03 04:02:59 +00:00
2010-11-27 20:43:02 +00:00
2010-03-05 06:17:43 +00:00
2010-09-30 23:57:10 +00:00
2010-02-27 23:53:53 +00:00
2010-09-30 23:57:10 +00:00
2009-10-23 05:58:34 +00:00
2009-10-23 05:58:34 +00:00
2009-10-23 05:58:34 +00:00
2009-10-23 05:58:34 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:09:05 +00:00
2009-10-16 22:07:19 +00:00
2010-10-03 22:52:07 +00:00
2010-04-28 08:30:49 +00:00
2010-06-09 20:30:22 +00:00
2009-12-15 03:00:32 +00:00