Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
94378112
Commit
94378112
authored
Jul 31, 2013
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for
#7116
(strength reduction)
parent
c93e8668
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
0 deletions
+97
-0
testsuite/tests/numeric/should_compile/Makefile
testsuite/tests/numeric/should_compile/Makefile
+7
-0
testsuite/tests/numeric/should_compile/T7116.hs
testsuite/tests/numeric/should_compile/T7116.hs
+19
-0
testsuite/tests/numeric/should_compile/T7116.stdout
testsuite/tests/numeric/should_compile/T7116.stdout
+70
-0
testsuite/tests/numeric/should_compile/all.T
testsuite/tests/numeric/should_compile/all.T
+1
-0
No files found.
testsuite/tests/numeric/should_compile/Makefile
0 → 100644
View file @
94378112
TOP
=
../../..
include
$(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/test.mk
T7116
:
$(RM)
-f
T7116.o T7116.hi
'
$(TEST_HC)
'
$(TEST_HC_OPTS)
-O2
-c
-ddump-simpl
T7116.hs
testsuite/tests/numeric/should_compile/T7116.hs
0 → 100644
View file @
94378112
module
T7116
where
-- this module tests strength reduction, i.e. turning floating
-- point multiplication by two into addition:
--
-- 2.0 * x -> x + x
dl
::
Double
->
Double
dl
x
=
2.0
*
x
dr
::
Double
->
Double
dr
x
=
x
*
2.0
fl
::
Float
->
Float
fl
x
=
2.0
*
x
fr
::
Float
->
Float
fr
x
=
x
*
2.0
testsuite/tests/numeric/should_compile/T7116.stdout
0 → 100644
View file @
94378112
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 22, types: 14, coercions: 0}
T7116.dl :: GHC.Types.Double -> GHC.Types.Double
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType <S,1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (x_ae1 [Occ=Once!] :: GHC.Types.Double) ->
case x_ae1 of _ { GHC.Types.D# y_afn ->
GHC.Types.D# (GHC.Prim.+## y_afn y_afn)
}}]
T7116.dl =
\ (x_ae1 :: GHC.Types.Double) ->
case x_ae1 of _ { GHC.Types.D# y_afn ->
GHC.Types.D# (GHC.Prim.+## y_afn y_afn)
}
T7116.dr :: GHC.Types.Double -> GHC.Types.Double
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType <S,1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (x_aem [Occ=Once!] :: GHC.Types.Double) ->
case x_aem of _ { GHC.Types.D# x1_afj ->
GHC.Types.D# (GHC.Prim.+## x1_afj x1_afj)
}}]
T7116.dr = T7116.dl
T7116.fl :: GHC.Types.Float -> GHC.Types.Float
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType <S,1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (x_aen [Occ=Once!] :: GHC.Types.Float) ->
case x_aen of _ { GHC.Types.F# y_afx ->
GHC.Types.F# (GHC.Prim.plusFloat# y_afx y_afx)
}}]
T7116.fl =
\ (x_aen :: GHC.Types.Float) ->
case x_aen of _ { GHC.Types.F# y_afx ->
GHC.Types.F# (GHC.Prim.plusFloat# y_afx y_afx)
}
T7116.fr :: GHC.Types.Float -> GHC.Types.Float
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType <S,1*U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
ConLike=True, WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (x_aeo [Occ=Once!] :: GHC.Types.Float) ->
case x_aeo of _ { GHC.Types.F# x1_aft ->
GHC.Types.F# (GHC.Prim.plusFloat# x1_aft x1_aft)
}}]
T7116.fr = T7116.fl
testsuite/tests/numeric/should_compile/all.T
0 → 100644
View file @
94378112
test
('
T7116
',
normal
,
run_command
,
['
$MAKE -s --no-print-directory T7116
'])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment