llvm-6502/test/CodeGen
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
..
Alpha PR7774: Fix undefined shifts in Alpha backend. As a bonus, this actually 2010-08-01 21:13:28 +00:00
ARM ARM/MC/ELF relocation "hello world" for movw/movt. 2010-12-01 02:40:06 +00:00
Blackfin
CBackend
CellSPU Handle lshr for i128 correctly on SPU also when 2010-11-29 14:44:28 +00:00
CPP
Generic Removing the useless test that I added recently. It was meant as an example, but not complicated enough to merit another test. 2010-11-20 07:26:51 +00:00
MBlaze Implement branch analysis in the MBlaze backend. 2010-11-21 21:53:36 +00:00
Mips Enable mips32 mul instruction. Patch by Akira Hatanaka <ahatanaka@mips.com> 2010-11-12 00:38:32 +00:00
MSP430 Inline asm mult-alt constraint tests. 2010-11-02 23:01:44 +00:00
PowerPC remove a pointless testcase. 2010-11-15 05:07:03 +00:00
PTX ptx: add command-line options for gpu target and ptx version 2010-11-30 10:14:14 +00:00
SPARC filecheckize 2010-11-23 02:26:52 +00:00
SystemZ Correct bogus module triple specifications. 2010-08-30 10:48:29 +00:00
Thumb Fix epilogue codegen to avoid leaving the stack pointer in an invalid 2010-11-22 18:12:04 +00:00
Thumb2 The Thumb tADDrSPi instruction is not valid when the destination is SP. 2010-12-04 04:40:19 +00:00
X86 generalize the previous check to handle -1 on either side of the 2010-12-05 02:00:51 +00:00
XCore Enable machine sinking critical edge splitting. e.g. 2010-09-20 22:52:00 +00:00
thumb2-mul.ll Enable target-specific mul-lowering on ARM, even at -Os. Remove a test that this makes 2010-09-21 22:51:46 +00:00