llvm-6502/lib
Benjamin Kramer 1db071f0da Teach instcombine to transform
(X >s -1) ? C1 : C2 and (X <s  0) ? C2 : C1
into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional.

This optimization could be extended to take non-const C1 and C2 but we better
stay conservative to avoid code size bloat for now.

for
int sel(int n) {
     return n >= 0 ? 60 : 100;
}

we now generate
  sarl  $31, %edi
  andl  $40, %edi
  leal  60(%rdi), %eax

instead of
  testl %edi, %edi
  movl  $60, %ecx
  movl  $100, %eax
  cmovnsl %ecx, %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08 11:39:10 +00:00
..
Analysis Minore code simplification. 2010-07-07 14:30:04 +00:00
Archive Eliminate some unnessary Path::exists() calls. 2010-05-27 20:51:54 +00:00
AsmParser Implement the "linker_private_weak" linkage type. This will be used for 2010-07-01 21:55:59 +00:00
Bitcode Implement the "linker_private_weak" linkage type. This will be used for 2010-07-01 21:55:59 +00:00
CodeGen Add TargetInstrInfo::copyPhysReg hook and use it from LowerSubregs. 2010-07-08 05:01:41 +00:00
CompilerDriver 80-col violation. 2010-07-01 01:00:27 +00:00
ExecutionEngine Handle execution entrypoints with non-integer return types. 2010-06-18 02:01:10 +00:00
Linker Revert r107205 and r107207. 2010-06-29 22:34:52 +00:00
MC finish up support for callw: PR7195 2010-07-07 22:35:13 +00:00
Support add some triple for minix, patch by Kees van Reeuwijk from PR7582 2010-07-07 15:52:27 +00:00
System add some triple for minix, patch by Kees van Reeuwijk from PR7582 2010-07-07 15:52:27 +00:00
Target Teach instcombine to transform 2010-07-08 11:39:10 +00:00
Transforms Teach instcombine to transform 2010-07-08 11:39:10 +00:00
VMCore use PrintEscapedString to handle attribute section with escapes in it, 2010-07-07 23:16:37 +00:00
Makefile