Skip to content
  1. May 23, 2011
  2. May 22, 2011
  3. May 21, 2011
  4. May 20, 2011
  5. May 19, 2011
  6. May 18, 2011
  7. May 17, 2011
  8. May 16, 2011
  9. May 14, 2011
  10. May 07, 2011
  11. May 06, 2011
  12. May 05, 2011
  13. May 04, 2011
  14. May 03, 2011
  15. May 02, 2011
  16. Apr 30, 2011
    • Benjamin Kramer's avatar
      InstCombine: Turn (zext A) udiv (zext B) into (zext (A udiv B)). Same for urem or constant B. · 9aa91b1f
      Benjamin Kramer authored
      This obviously helps a lot if the division would be turned into a libcall
      (think i64 udiv on i386), but div is also one of the few remaining instructions
      on modern CPUs that become more expensive when the bitwidth gets bigger.
      
      This also helps register pressure on i386 when dividing chars, divb needs
      two 8-bit parts of a 16 bit register as input where divl uses two registers.
      
      int foo(unsigned char a) { return a/10; }
      int bar(unsigned char a, unsigned char b) { return a/b; }
      
      compiles into (x86_64)
      _foo:
        imull $205, %edi, %eax
        shrl  $11, %eax
        ret
      _bar:
        movzbl        %dil, %eax
        divb  %sil, %al
        movzbl        %al, %eax
        ret
      
      llvm-svn: 130615
      9aa91b1f
    • Benjamin Kramer's avatar
      Use SimplifyDemandedBits on div instructions. · 57b3df59
      Benjamin Kramer authored
      This folds away silly stuff like (a&255)/1000 -> 0.
      
      llvm-svn: 130614
      57b3df59
    • Benjamin Kramer's avatar
      FileCheckize. · 6a50bbd2
      Benjamin Kramer authored
      llvm-svn: 130613
      6a50bbd2
  17. Apr 29, 2011
Loading