Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • .gitlab/generate-ci/gen_ci.hs
    ... ... @@ -1250,7 +1250,7 @@ alpine_x86 =
    1250 1250
       , fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine312) staticNativeInt)))
    
    1251 1251
         -- Dynamically linked build, suitable for building your own static executables on alpine
    
    1252 1252
       , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine323) (splitSectionsBroken vanilla))
    
    1253
    -  , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine323) (splitSectionsBroken vanilla))
    
    1253
    +  , standardBuildsWithConfig I386 (Linux Alpine323) (splitSectionsBroken vanilla)
    
    1254 1254
       ]
    
    1255 1255
       where
    
    1256 1256
         -- ghcilink002 broken due to #17869
    

  • .gitlab/jobs.yaml
    ... ... @@ -484,7 +484,7 @@
    484 484
           ".gitlab/ci.sh clean",
    
    485 485
           "cat ci_timings.txt"
    
    486 486
         ],
    
    487
    -    "allow_failure": true,
    
    487
    +    "allow_failure": false,
    
    488 488
         "artifacts": {
    
    489 489
           "expire_in": "2 weeks",
    
    490 490
           "paths": [
    
    ... ... @@ -1155,7 +1155,7 @@
    1155 1155
           ".gitlab/ci.sh clean",
    
    1156 1156
           "cat ci_timings.txt"
    
    1157 1157
         ],
    
    1158
    -    "allow_failure": true,
    
    1158
    +    "allow_failure": false,
    
    1159 1159
         "artifacts": {
    
    1160 1160
           "expire_in": "8 weeks",
    
    1161 1161
           "paths": [
    
    ... ... @@ -4034,7 +4034,7 @@
    4034 4034
           ".gitlab/ci.sh clean",
    
    4035 4035
           "cat ci_timings.txt"
    
    4036 4036
         ],
    
    4037
    -    "allow_failure": true,
    
    4037
    +    "allow_failure": false,
    
    4038 4038
         "artifacts": {
    
    4039 4039
           "expire_in": "1 year",
    
    4040 4040
           "paths": [
    

  • compiler/GHC/CmmToLlvm/CodeGen.hs
    ... ... @@ -248,6 +248,14 @@ Since x86 PDep/PExt instructions only exist for 32/64 bit widths
    248 248
     we use the 32bit variant to compute the 8/16bit primops.
    
    249 249
     To do so we extend/truncate the argument/result around the
    
    250 250
     call.
    
    251
    +
    
    252
    +Note that the 64-bit intrinsics (`llvm.x86.bmi.pdep.64` and
    
    253
    +`llvm.x86.bmi.pext.64`) are only legal on 64-bit x86 targets, not on
    
    254
    +i386. Therefore on i386 we must fall back to the runtime helper
    
    255
    +(`hs_pdep64`/`hs_pext64`) for the 64-bit primops.
    
    256
    +
    
    257
    +See https://github.com/llvm/llvm-project/issues/172857 for upstream
    
    258
    +discussion about portable pdep/pext intrinsics.
    
    251 259
     -}
    
    252 260
     genCall (PrimTarget op@(MO_Pdep w)) [dst] args = do
    
    253 261
         cfg <- getConfig
    
    ... ... @@ -970,36 +978,34 @@ cmmPrimOpFunctions mop = do
    970 978
               W8   -> fsLit "llvm.x86.bmi.pdep.32"
    
    971 979
               W16  -> fsLit "llvm.x86.bmi.pdep.32"
    
    972 980
               W32  -> fsLit "llvm.x86.bmi.pdep.32"
    
    973
    -          W64  -> fsLit "llvm.x86.bmi.pdep.64"
    
    974
    -          W128 -> fsLit "llvm.x86.bmi.pdep.128"
    
    975
    -          W256 -> fsLit "llvm.x86.bmi.pdep.256"
    
    976
    -          W512 -> fsLit "llvm.x86.bmi.pdep.512"
    
    981
    +          W64
    
    982
    +            | is32bit   -> fsLit "hs_pdep64"
    
    983
    +            | otherwise -> fsLit "llvm.x86.bmi.pdep.64"
    
    984
    +          -- LLVM only provides x86 PDep/PExt intrinsics for 32/64 bits
    
    985
    +          _ -> unsupported
    
    977 986
           | otherwise -> case w of
    
    978 987
               W8   -> fsLit "hs_pdep8"
    
    979 988
               W16  -> fsLit "hs_pdep16"
    
    980 989
               W32  -> fsLit "hs_pdep32"
    
    981 990
               W64  -> fsLit "hs_pdep64"
    
    982
    -          W128 -> fsLit "hs_pdep128"
    
    983
    -          W256 -> fsLit "hs_pdep256"
    
    984
    -          W512 -> fsLit "hs_pdep512"
    
    991
    +          _ -> unsupported
    
    985 992
         MO_Pext w
    
    986 993
           | isBmi2Enabled -> case w of
    
    987 994
               -- See Note [LLVM PDep/PExt intrinsics]
    
    988 995
               W8   -> fsLit "llvm.x86.bmi.pext.32"
    
    989 996
               W16  -> fsLit "llvm.x86.bmi.pext.32"
    
    990 997
               W32  -> fsLit "llvm.x86.bmi.pext.32"
    
    991
    -          W64  -> fsLit "llvm.x86.bmi.pext.64"
    
    992
    -          W128 -> fsLit "llvm.x86.bmi.pext.128"
    
    993
    -          W256 -> fsLit "llvm.x86.bmi.pext.256"
    
    994
    -          W512 -> fsLit "llvm.x86.bmi.pext.512"
    
    998
    +          W64
    
    999
    +            | is32bit   -> fsLit "hs_pext64"
    
    1000
    +            | otherwise -> fsLit "llvm.x86.bmi.pext.64"
    
    1001
    +          -- LLVM only provides x86 PDep/PExt intrinsics for 32/64 bits
    
    1002
    +          _ -> unsupported
    
    995 1003
           | otherwise -> case w of
    
    996 1004
               W8   -> fsLit "hs_pext8"
    
    997 1005
               W16  -> fsLit "hs_pext16"
    
    998 1006
               W32  -> fsLit "hs_pext32"
    
    999 1007
               W64  -> fsLit "hs_pext64"
    
    1000
    -          W128 -> fsLit "hs_pext128"
    
    1001
    -          W256 -> fsLit "hs_pext256"
    
    1002
    -          W512 -> fsLit "hs_pext512"
    
    1008
    +          _ -> unsupported
    
    1003 1009
     
    
    1004 1010
         MO_AddIntC w    -> case w of
    
    1005 1011
           W8   -> fsLit "llvm.sadd.with.overflow.i8"