Skip to content
  • Chris Lattner's avatar
    When possible, custom lower 32-bit SINT_TO_FP to this: · 4a66d694
    Chris Lattner authored
    _foo2:
            extsw r2, r3
            std r2, -8(r1)
            lfd f0, -8(r1)
            fcfid f0, f0
            frsp f1, f0
            blr
    
    instead of this:
    
    _foo2:
            lis r2, ha16(LCPI2_0)
            lis r4, 17200
            xoris r3, r3, 32768
            stw r3, -4(r1)
            stw r4, -8(r1)
            lfs f0, lo16(LCPI2_0)(r2)
            lfd f1, -8(r1)
            fsub f0, f1, f0
            frsp f1, f0
            blr
    
    This speeds up Misc/pi from 2.44s->2.09s with LLC and from 3.01->2.18s
    with llcbeta (16.7% and 38.1% respectively).
    
    llvm-svn: 26943
    4a66d694
Loading