Skip to content
  1. May 10, 2005
  2. May 09, 2005
  3. May 08, 2005
  4. May 07, 2005
  5. May 06, 2005
    • Chris Lattner's avatar
      Preserve tail marker · 6aacb0f9
      Chris Lattner authored
      llvm-svn: 21737
      6aacb0f9
    • Chris Lattner's avatar
      Teach instcombine propagate zeroness through shl instructions, implementing · ef298a3b
      Chris Lattner authored
      and.ll:test31
      
      llvm-svn: 21717
      ef298a3b
    • Chris Lattner's avatar
      Implement shift.ll:test23. If we are shifting right then immediately truncating · 87380416
      Chris Lattner authored
      the result, turn signed shift rights into unsigned shift rights if possible.
      
      This leads to later simplification and happens *often* in 176.gcc.  For example,
      this testcase:
      
      struct xxx { unsigned int code : 8; };
      enum codes { A, B, C, D, E, F };
      int foo(struct xxx *P) {
        if ((enum codes)P->code == A)
           bar();
      }
      
      used to be compiled to:
      
      int %foo(%struct.xxx* %P) {
              %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0           ; <uint*> [#uses=1]
              %tmp.2 = load uint* %tmp.1              ; <uint> [#uses=1]
              %tmp.3 = cast uint %tmp.2 to int                ; <int> [#uses=1]
              %tmp.4 = shl int %tmp.3, ubyte 24               ; <int> [#uses=1]
              %tmp.5 = shr int %tmp.4, ubyte 24               ; <int> [#uses=1]
              %tmp.6 = cast int %tmp.5 to sbyte               ; <sbyte> [#uses=1]
              %tmp.8 = seteq sbyte %tmp.6, 0          ; <bool> [#uses=1]
              br bool %tmp.8, label %then, label %UnifiedReturnBlock
      
      Now it is compiled to:
      
              %tmp.1 = getelementptr %struct.xxx* %P, int 0, uint 0           ; <uint*> [#uses=1]
              %tmp.2 = load uint* %tmp.1              ; <uint> [#uses=1]
              %tmp.2 = cast uint %tmp.2 to sbyte              ; <sbyte> [#uses=1]
              %tmp.8 = seteq sbyte %tmp.2, 0          ; <bool> [#uses=1]
              br bool %tmp.8, label %then, label %UnifiedReturnBlock
      
      which is the difference between this:
      
      foo:
              subl $4, %esp
              movl 8(%esp), %eax
              movl (%eax), %eax
              shll $24, %eax
              sarl $24, %eax
              testb %al, %al
              jne .LBBfoo_2
      
      and this:
      
      foo:
              subl $4, %esp
              movl 8(%esp), %eax
              movl (%eax), %eax
              testb %al, %al
              jne .LBBfoo_2
      
      This occurs 3243 times total in the External tests, 215x in povray,
      6x in each f2c'd program, 1451x in 176.gcc, 7x in crafty, 20x in perl,
      25x in gap, 3x in m88ksim, 25x in ijpeg.
      
      Maybe this will cause a little jump on gcc tommorow :)
      
      llvm-svn: 21715
      87380416
    • Chris Lattner's avatar
      Implement xor.ll:test22 · 7208616e
      Chris Lattner authored
      llvm-svn: 21713
      7208616e
    • Chris Lattner's avatar
      implement and.ll:test30 and set.ll:test21 · 4c2d3781
      Chris Lattner authored
      llvm-svn: 21712
      4c2d3781
    • Chris Lattner's avatar
      implement or.ll:test20 · dd1e562e
      Chris Lattner authored
      llvm-svn: 21709
      dd1e562e
  6. May 04, 2005
  7. May 02, 2005
  8. May 01, 2005
  9. Apr 26, 2005
  10. Apr 25, 2005
  11. Apr 24, 2005
  12. Apr 23, 2005
  13. Apr 22, 2005
  14. Apr 21, 2005
    • Chris Lattner's avatar
      Instcombine this: · 374e6594
      Chris Lattner authored
              %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4             ; <bool> [#uses=1]
              %tmp.6 = cast bool %shortcirc_val to int                ; <int> [#uses=1]
      
      into this:
      
              %shortcirc_val = or bool %tmp.1, %tmp.4         ; <bool> [#uses=1]
              %tmp.6 = cast bool %shortcirc_val to int                ; <int> [#uses=1]
      
      not this:
      
              %tmp.4.cast = cast bool %tmp.4 to int           ; <int> [#uses=1]
              %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast             ; <int> [#uses=1]
      
      llvm-svn: 21389
      374e6594
  15. Apr 19, 2005
  16. Apr 18, 2005
Loading