#3181: Regression in unboxing
--------------------------------+-------------------------------------------
    Reporter:  dolio            |        Owner:                         
        Type:  bug              |       Status:  new                    
    Priority:  normal           |    Milestone:  6.12.2                 
   Component:  Compiler         |      Version:  6.10.2                 
    Keywords:  unboxing boxing  |   Difficulty:  Unknown                
          Os:  Linux            |     Testcase:                         
Architecture:  x86_64 (amd64)   |      Failure:  Runtime performance bug
--------------------------------+-------------------------------------------

Comment(by igloo):

 I can't reproduce this. With 6.8.2:
 {{{
 $ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.8.2
 $ ghc -O -c Vector.hs
 $ ghc -O -c StrictPair.hs -ddump-simpl
 }}}
 I get this:
 {{{
                   $w$j_sBq =
                     \ (w2_sAq :: GHC.Prim.State# GHC.Prim.RealWorld)
                       (ww2_sAt :: GHC.Base.Int)
                       (ww3_sAw :: GHC.Prim.Int#) ->
                       case w_sAC of wild11_auu { GHC.Base.I# x#_auw ->
                       case GHC.Prim.<# x#_auw ww3_sAw of wild2_axd {
                         GHC.Base.False ->
                           case GHC.Prim.==# x#_auw ww3_sAw of wild12_axg {
                             GHC.Base.False ->
                               case GHC.Prim.writeIntArray#
                                      @ GHC.Prim.RealWorld arr_avS
 (GHC.Prim.+# ww_sAF 40) x#_auw w2_sAq
                               of s'1_awJ { __DEFAULT ->
                               (# s'1_awJ, GHC.Base.() #)
                               };
                             GHC.Base.True ->
                               case GHC.Prim.writeIntArray#
                                      @ GHC.Prim.RealWorld arr_avS
 (GHC.Prim.+# ww_sAF 40) x#_auw w2_sAq
                               of s'1_awJ { __DEFAULT ->
                               (# s'1_awJ, GHC.Base.() #)
                               }
                           };
                         GHC.Base.True ->
                           case GHC.Prim.writeIntArray#
                                  @ GHC.Prim.RealWorld arr_avS (GHC.Prim.+#
 ww_sAF 40) ww3_sAw w2_sAq
                           of s'1_awJ { __DEFAULT ->
                           case ww2_sAt of w3_XAV { GHC.Base.I# ww4_XBA ->
                           $wa_sBo wild11_auu ww4_XBA ww1_sAJ s'1_awJ
                           }
                           }
                       }
 }}}
 which seems to have the same boxed `Int`. Can you say exactly how you are
 compiling it to get the result you want with 6.8.2 please?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3181#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to