[Git][ghc/ghc][wip/ubxsumtag] adjust T25166 and fixes for 32 bit

Luite Stegeman (@luite) gitlab at gitlab.haskell.org
Mon Feb 10 09:47:32 UTC 2025



Luite Stegeman pushed to branch wip/ubxsumtag at Glasgow Haskell Compiler / GHC


Commits:
3a1a1c90 by Luite Stegeman at 2025-02-10T10:46:41+01:00
adjust T25166 and fixes for 32 bit

- - - - -


3 changed files:

- compiler/GHC/Types/RepType.hs
- testsuite/tests/codeGen/should_compile/T25166.stdout → testsuite/tests/codeGen/should_compile/T25166.stdout-ws-32
- + testsuite/tests/codeGen/should_compile/T25166.stdout-ws-64


Changes:

=====================================
compiler/GHC/Types/RepType.hs
=====================================
@@ -233,7 +233,8 @@ ubxSumRepType constrs0
       -- constructors start at 1 (XXX is this correct?)
       tag_slot | length constrs0 < 256        = Word8Slot
                | length constrs0 < 65536      = Word16Slot
-               | length constrs0 < 4294967296 = Word32Slot
+--                | length constrs0 < 4294967296 = Word32Slot
+               | length constrs0 < 2147483647 = Word32Slot -- XXX temporary for 32 bit platforms
                | otherwise                    = WordSlot
 
       sumRep = tag_slot :| combine_alts (map rep constrs0)


=====================================
testsuite/tests/codeGen/should_compile/T25166.stdout → testsuite/tests/codeGen/should_compile/T25166.stdout-ws-32
=====================================
@@ -2,5 +2,7 @@
      Test.foo_closure:
          const Test.D_con_info;
          const GHC.Internal.Types.True_closure+2;
-         const 2;
+         const 2 :: W8;
+         const 0 :: W16;
+         const 0 :: W8;
          const 3;


=====================================
testsuite/tests/codeGen/should_compile/T25166.stdout-ws-64
=====================================
@@ -0,0 +1,9 @@
+[section ""data" . Test.foo_closure" {
+     Test.foo_closure:
+         const Test.D_con_info;
+         const GHC.Internal.Types.True_closure+2;
+         const 2 :: W8;
+         const 0 :: W32;
+         const 0 :: W16;
+         const 0 :: W8;
+         const 3;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a1a1c901cc537cec7d67c813f78e62c992a73c5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3a1a1c901cc537cec7d67c813f78e62c992a73c5
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250210/98130107/attachment-0001.html>


More information about the ghc-commits mailing list