Skip to content
  • Chris Lattner's avatar
    Turn sdiv into udiv if both operands have a clear sign bit. This occurs · dd0c1740
    Chris Lattner authored
    a few times in crafty:
    
    OLD:    %tmp.36 = div int %tmp.35, 8            ; <int> [#uses=1]
    NEW:    %tmp.36 = div uint %tmp.35, 8           ; <uint> [#uses=0]
    OLD:    %tmp.19 = div int %tmp.18, 8            ; <int> [#uses=1]
    NEW:    %tmp.19 = div uint %tmp.18, 8           ; <uint> [#uses=0]
    OLD:    %tmp.117 = div int %tmp.116, 8          ; <int> [#uses=1]
    NEW:    %tmp.117 = div uint %tmp.116, 8         ; <uint> [#uses=0]
    OLD:    %tmp.92 = div int %tmp.91, 8            ; <int> [#uses=1]
    NEW:    %tmp.92 = div uint %tmp.91, 8           ; <uint> [#uses=0]
    
    Which all turn into shrs.
    
    llvm-svn: 24190
    dd0c1740
Loading