llvm-6502/test/CodeGen
Chris Lattner a2b5600e61 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-05 01:23:24 +00:00
..
Alpha
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
MBlaze
Mips
MSP430
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
SystemZ
Thumb
Thumb2 The Thumb tADDrSPi instruction is not valid when the destination is SP. 2010-12-04 04:40:19 +00:00
X86 Improve an integer select optimization in two ways: 2010-12-05 01:23:24 +00:00
XCore
thumb2-mul.ll