Skip to content
  1. Dec 23, 2010
    • Jeffrey Yasskin's avatar
      Change all self assignments X=X to (void)X, so that we can turn on a · 9b43f336
      Jeffrey Yasskin authored
      new gcc warning that complains on self-assignments and
      self-initializations.
      
      llvm-svn: 122458
      9b43f336
    • Benjamin Kramer's avatar
      DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is illegal. ... · 1f4dfbbc
      Benjamin Kramer authored
      DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is illegal.  The latter usually compiles into smaller code.
      
      example code:
      unsigned foo(unsigned x, unsigned y) {
        if (x != 0) y--;
        return y;
      }
      
      before:
        _foo:                           ## @foo
          cmpl  $1, 4(%esp)             ## encoding: [0x83,0x7c,0x24,0x04,0x01]
          sbbl  %eax, %eax              ## encoding: [0x19,0xc0]
          notl  %eax                    ## encoding: [0xf7,0xd0]
          addl  8(%esp), %eax           ## encoding: [0x03,0x44,0x24,0x08]
          ret                           ## encoding: [0xc3]
      
      after:
        _foo:                           ## @foo
          cmpl  $1, 4(%esp)             ## encoding: [0x83,0x7c,0x24,0x04,0x01]
          movl  8(%esp), %eax           ## encoding: [0x8b,0x44,0x24,0x08]
          adcl  $-1, %eax               ## encoding: [0x83,0xd0,0xff]
          ret                           ## encoding: [0xc3]
      
      llvm-svn: 122455
      1f4dfbbc
  2. Dec 22, 2010
  3. Dec 21, 2010
  4. Dec 20, 2010
  5. Dec 19, 2010
Loading