Skip to content
  • Benjamin Kramer's avatar
    X86: Promote i8 cmov when both operands are coming from truncates of the same width. · d6b9362f
    Benjamin Kramer authored
    X86 doesn't have i8 cmovs so isel would emit a branch. Emitting branches at this
    level is often not a good idea because it's too late for many optimizations to
    kick in. This solution doesn't add any extensions (truncs are free) and tries
    to avoid introducing partial register stalls by filtering direct copyfromregs.
    
    I'm seeing a ~10% speedup on reading a random .png file with libpng15 via
    graphicsmagick on x86_64/westmere, but YMMV depending on the microarchitecture.
    
    llvm-svn: 165868
    d6b9362f
Loading