Compiler optimizations questions for ghc 6.10...
Krasimir Angelov
kr.angelov at gmail.com
Thu Feb 19 16:34:47 EST 2009
I was surprised to see this case expression:
> case GHC.Prim.-# 9223372036854775807 ipv_s1bD
> of wild2_a1xi [ALWAYS Just L] {
What is the purpose to compare the value with maxBound before the
division? The case expression doesn't disappear even if I use quot
instead of div.
Krasimir
2009/2/18 Tyson Whitehead <twhitehead at gmail.com>:
> digit_s1lk =
> \ (x_aqR [ALWAYS Just U(L)] :: GHC.Types.Int) ->
> case x_aqR
> of x_XsQ [ALWAYS Just A] { GHC.Types.I# ipv_s1bD [ALWAYS Just L] ->
> let {
> lvl_s1my [ALWAYS Just D(T)] :: GHC.Types.Int
> [Str: DmdType]
> lvl_s1my =
> case GHC.Prim.-# 9223372036854775807 ipv_s1bD
> of wild2_a1xi [ALWAYS Just L] {
> __DEFAULT ->
> case GHC.Base.divInt# wild2_a1xi 10
> of wild21_a1xj [ALWAYS Just L] { __DEFAULT ->
> GHC.Types.I# wild21_a1xj
> };
> (-9223372036854775808) ->
> case GHC.Base.divInt# (-9223372036854775808) 10
> of wild21_a1xl [ALWAYS Just L] { __DEFAULT ->
> GHC.Types.I# wild21_a1xl
> }
> } } in
> (\ (eta_X1sU [ALWAYS Just L] :: GHC.Types.Int)
> (eta_s1G7 [ALWAYS Just U(L)] :: GHC.Types.Int) ->
More information about the Glasgow-haskell-users
mailing list