<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
John Ericson pushed to branch wip/int64-everywhere-new-float-primops
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b45de34ec990a773014e91d41315f71f25290ca4">b45de34e</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-11-22T22:49:08+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix toArgRep to support 64-bit reps on all systems

[This is @Ericson2314 writing a commit message for @hsyl20's patch.]

(Progress towards #11953, #17377, #17375)

`Int64Rep` and `Word64Rep` are currently broken on 64-bit systems.  This
is because they should use "native arg rep" but instead use "large arg
rep" as they do on 32-bit systems, which is either a non-concept or a
128-bit rep depending on one's vantage point.

Now, these reps currently aren't used during 64-bit compilation, so the
brokenness isn't observed, but I don't think that constitutes reasons
not to fix it. Firstly, the linked issues there is a clearly expressed
desire to use explicit-bitwidth constructs in more places. Secondly, per
[1], there are other bugs that *do* manifest from not threading
explicit-bitwidth information all the way through the compilation
pipeline. One can therefore view this as one piece of the larger effort
to do that, improve ergnomics, and squash remaining bugs.

Also, this is needed for !3658. I could just merge this as part of that,
but I'm keen on merging fixes "as they are ready" so the fixes that
aren't ready are isolated and easier to debug.

[1]: https://mail.haskell.org/pipermail/ghc-devs/2020-October/019332.html
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0ddb14aae49fcc4efc0b72e440d4c6376375d14a">0ddb14aa</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-22T23:35:09+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Merge branch 'wip/fix-64-toArgRep' into HEAD
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b110ae65f9801d38b3fa423f28f0f44f0303a640">b110ae65</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T03:47:10+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Cleanup some primop-related identifers

 - Don't use "extend" or "narrow" in some of the user-facing primops
   names for conversions.

     - Names like `narrowInt32#` are misleading when `Int` is 32-bits.

     - Names like `extendInt64#` are flat-out wrong when `Int is
       32-bits.

 - Harmonize the internal (big sum type) names of the native vs
   fixed-sized number primops a bit. (Mainly by renaming the former.)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0db851a17173b1a2cb2d3ba3e85666f1675f5fe2">0db851a1</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T03:49:25+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Merge branch 'wip/primop-naming-consistency' into HEAD
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f004001ecd2b87d63a15ace3dd7035cc05ef6787">f004001e</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-11-23T15:21:42+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make proper fixed-with number literals

(Progress towards #11953, #17377, #17375)

Besides being nicer to use, this also will allow for better constant
folding for the fixed-width types, on par with what `Int#` and `Word#`
have today.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9428b9c985dd078bb1d4f8bcb10f11e7a2c1297a">9428b9c9</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:14+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Merge branch 'wip/fixed-width-lits' into HEAD
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1b9013848f6a0d7132387dfd8f10d20a3063164d">1b901384</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make fixed-size `Int32#` and `Int64#`

The boxed Int64 uses Int64#, but Int32# still uses Int#. The 32-bit case
is less pressing to change because it is not a source of brittle
CPP---it is the same thing on all platforms.

We need Int64/Word64 constant folding to avoid the let/app restriction on Core, so
that is implemented now. 32-bit constant unfolding and 32-bit literals
are left as follow-up.

This is the bulk of #11953

Co-authored-by: Sylvain Henry <hsyl20@gmail.com>
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e3041c56079c342c7ea1f18499256a803a263c9f">e3041c56</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Inline INT64 and WORD64 macros in primops.txt.pp

The definition is now unconditional so there is no reason for that CPP.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0055dfb76f7e7b89cfc30696c9933c9090a8cda7">0055dfb7</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Adapt rules from #16402 to Word64#/Int64#
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/844eb6c1c3833a54b9f7350b8e8b58b8236516e0">844eb6c1</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Copy enumFrom* implementations from Int/Word for Int64/Word64

Without this, we don't get proper list fusion.

I think this sort of copying is OK for now, but we absolutely need
something better if we are going to make `IntN` use `IntN#` for all `N`.
The degree to which proper metaprogramming has been punted upon by
factoring everything through the native-sized types is disconcerting.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/46b9e1bef7dff4e2692b647eca73ec96270182a9">46b9e1be</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">`integerFromInt64#` can be inlined when the word size is >= 64 bits

Maybe this will help with the renaming test failure?
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/beba0c1e4a7a6a9547e5d110172dbf1403a5e0ac">beba0c1e</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:30:18+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add builtin rule for `divInt64#` and `modInt64#`
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8569aa12c9e2b2c014f0096f1e52641aecebb159">8569aa12</a></strong>
<div>
<span>by John Ericson</span>
<i>at 2020-11-23T15:35:30+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">WIP: Add missing floats <-> int/word 64 rule and primops
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#0887cf39c5cdf9cf8d6758f410d7dab3023c0d77">
compiler/GHC/Builtin/Names.hs
</a>
</li>
<li class="file-stats">
<a href="#ee840b93f51ee5ed4233a2f892343421ba49af58">
compiler/GHC/Builtin/bytearray-ops.txt.pp
</a>
</li>
<li class="file-stats">
<a href="#451725cc4e5d443a3b7c2adcdf224840f953b7e2">
compiler/GHC/Builtin/primops.txt.pp
</a>
</li>
<li class="file-stats">
<a href="#2f6f8d6d05acc04b08fff94df4b3996c65b87892">
compiler/GHC/ByteCode/Asm.hs
</a>
</li>
<li class="file-stats">
<a href="#c898e00d01234ab22d3b485be68db3645f52f220">
compiler/GHC/Cmm/MachOp.hs
</a>
</li>
<li class="file-stats">
<a href="#c1d65bce6c6501bf42d5bf890e846709b5645832">
compiler/GHC/CmmToAsm/CPrim.hs
</a>
</li>
<li class="file-stats">
<a href="#f71fa75baa7807186473f09c45a9ada1b72f4c6c">
compiler/GHC/CmmToAsm/PPC/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#e76eae04dea432f874db91c25e4a5725d7cc127b">
compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#2bae5947e9412f6deebf4db7dcb89d780913130f">
compiler/GHC/CmmToAsm/X86/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#76664ab267df4fc0bec2465efd78bf0afacfe3a7">
compiler/GHC/CmmToC.hs
</a>
</li>
<li class="file-stats">
<a href="#a49dbda5c8a9c380f638f55cf5ade791db0017cc">
compiler/GHC/CmmToLlvm/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#aa79261abf782f3dc603af7fbd5c4b08ed3ddb88">
compiler/GHC/Core/Opt/ConstantFold.hs
</a>
</li>
<li class="file-stats">
<a href="#4aad0050db1a8a20db8bbca149111de99cb299c9">
compiler/GHC/Core/TyCon.hs
</a>
</li>
<li class="file-stats">
<a href="#99771528d6dbafffa79f4900ea74e7d5ec76800c">
compiler/GHC/CoreToByteCode.hs
</a>
</li>
<li class="file-stats">
<a href="#f017e4c978a9ff341ce5a7b838787fd2a4758b59">
compiler/GHC/HsToCore/Match/Literal.hs
</a>
</li>
<li class="file-stats">
<a href="#9a73e96e44e832a1552fc6bfd3939464f00823a2">
compiler/GHC/Iface/Tidy/StaticPtrTable.hs
</a>
</li>
<li class="file-stats">
<a href="#a2c62760f11b20e48d80212d37abf12997369f19">
compiler/GHC/Platform.hs
</a>
</li>
<li class="file-stats">
<a href="#657eec52eed3c8be846a0b60eb6088d5f465de8a">
compiler/GHC/Stg/Lift/Analysis.hs
</a>
</li>
<li class="file-stats">
<a href="#1a141104a301aae725892eb71bc39ae039bcf246">
compiler/GHC/StgToCmm/ArgRep.hs
</a>
</li>
<li class="file-stats">
<a href="#7b3ca11b848c39ab65628e324180feb03c61a091">
compiler/GHC/StgToCmm/Layout.hs
</a>
</li>
<li class="file-stats">
<a href="#d12a108e34fe83acc9c99357ae841e22a0af0a23">
compiler/GHC/StgToCmm/Prim.hs
</a>
</li>
<li class="file-stats">
<a href="#b62375d0938c2cf6d00a6bec9649e795e57a9683">
compiler/GHC/StgToCmm/Ticky.hs
</a>
</li>
<li class="file-stats">
<a href="#3aa56839e36b2219f9ad54f5646ef3005da9c672">
compiler/GHC/Tc/Deriv/Generate.hs
</a>
</li>
<li class="file-stats">
<a href="#ad440013ca2a3a7accc3edc7f7807446b7b079c2">
compiler/GHC/Tc/Instance/Typeable.hs
</a>
</li>
<li class="file-stats">
<a href="#ee98f016857ad5548bb7cdc5dd85246585acdfd6">
compiler/GHC/Types/Literal.hs
</a>
</li>
<li class="file-stats">
<a href="#d3cf57b6a5ebc234dc7689db38ef9b6cf2259c0f">
compiler/GHC/Utils/Outputable.hs
</a>
</li>
<li class="file-stats">
<a href="#ccd32698c1d6d80e18d4e38a453603292e206906">
includes/stg/Prim.h
</a>
</li>
<li class="file-stats">
<a href="#48a6c03232a2b3f836daeff09b3c6e3790804632">
libraries/base/GHC/Exts.hs
</a>
</li>
<li class="file-stats">
<a href="#f4df73449102e301ecaa0e5dd6d41b079b28b6a4">
libraries/base/GHC/Float.hs
</a>
</li>
<li class="file-stats">
<a href="#8237d7c338108cdefc162d88e5819c2f43aebf02">
libraries/base/GHC/Float/ConversionUtils.hs
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/939e062466af51340a37d814142d5ceb1b4659bf...8569aa12c9e2b2c014f0096f1e52641aecebb159">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>