llvm/lib
Benjamin Kramer 7d6fe13efc Add some x86 specific dagcombines for conditional increments.
(add Y, (sete  X, 0)) -> cmp X, 1; adc  0, Y
(add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y
(sub (sete  X, 0), Y) -> cmp X, 1; sbb  0, Y
(sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y

for
  unsigned foo(unsigned a, unsigned b) {
    if (a == 0) b++;
    return b;
  }
we now get:
  foo:
    cmpl  $1, %edi
    movl  %esi, %eax
    adcl  $0, %eax
    ret
instead of:
  foo:
    testl %edi, %edi
    sete  %al
    movzbl  %al, %eax
    addl  %esi, %eax
    ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-21 21:41:44 +00:00
..
Analysis While I don't think any later transforms can fire, it seems cleaner to 2010-12-21 15:03:43 +00:00
Archive MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm. 2010-12-16 03:29:14 +00:00
AsmParser Add missing standard headers. Patch by Joerg Sonnenberger! 2010-12-19 20:43:38 +00:00
Bitcode Add missing standard headers. Patch by Joerg Sonnenberger! 2010-12-19 20:43:38 +00:00
CodeGen Revert 122353-122355 for the moment, they broke stuff. 2010-12-21 21:22:27 +00:00
CompilerDriver Support/PathV1: Deprecate get{Basename,Dirname,Suffix}. 2010-12-18 22:23:07 +00:00
ExecutionEngine Remove unneeded zero arrays. 2010-12-04 15:28:22 +00:00
Linker Fix whitespace. 2010-12-18 22:23:15 +00:00
MC Simplify EvaluateAsAbsolute now that EvaluateAsRelocatableImpl does all 2010-12-21 20:51:42 +00:00
Object Fix mismatched new[]/delete. 2010-12-17 09:56:50 +00:00
Support Use IntEqClasses to compute connected components of live intervals. 2010-12-21 00:48:17 +00:00
Target Add some x86 specific dagcombines for conditional increments. 2010-12-21 21:41:44 +00:00
Transforms GVN's Expression is not POD-like (it contains a SmallVector). Simplify code while at it. 2010-12-21 21:30:19 +00:00
VMCore rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for 2010-12-21 02:38:05 +00:00
Makefile Add LLVMObject Library. 2010-11-15 03:21:41 +00:00