
#8083: setNumCapabilities broken in HEAD
------------------------------------------------+--------------------------
Reporter: parcs | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result at runtime | Unknown/Multiple
Test Case: T8083 | Difficulty:
Blocking: | Unknown
| Blocked By:
| Related Tickets:
------------------------------------------------+--------------------------
Changes (by igloo):
* testcase: => T8083
Comment:
We get this:
{{{
==================== Post control-flow optimisations ====================
{offset
c18y:
if (Sp - <highSp> < SpLim) goto c18D; else goto c18E;
c18D:
R1 = Main.main1_closure;
call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
c18E:
_s188::I64 = %MO_SS_Conv_W32_W64(I32[n]);
_s188::I64 = _s188::I64;
_s189::I64 = _s188::I64;
if (_s189::I64 != 1) goto c18w; else goto c18x;
c18w:
R1 = GHC.Tuple.()_closure+1;
call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;
c18x:
_c18B::I64 = blah;
I64[(young<c18C> + 8)] = c18C;
foreign call "ccall" arg hints: [] result hints: []
(_c18B::I64)(...) returns to c18C args: ([]) ress: ([])upd: 8;
c18C:
R1 = GHC.Tuple.()_closure+1;
call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;
}
}}}
note that `c18w` and `c18C` look identical. They then get commoned up:
{{{
==================== Post common block elimination ====================
{offset
c18y:
if (Sp - <highSp> < SpLim) goto c18D; else goto c18E;
c18D:
R1 = Main.main1_closure;
call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
c18E:
_s188::I64 = %MO_SS_Conv_W32_W64(I32[n]);
_s188::I64 = _s188::I64;
_s189::I64 = _s188::I64;
if (_s189::I64 != 1) goto c18w; else goto c18x;
c18x:
_c18B::I64 = blah;
I64[(young<c18w> + 8)] = c18w;
foreign call "ccall" arg hints: [] result hints: []
(_c18B::I64)(...) returns to c18w args: ([]) ress: ([])upd: 8;
c18w:
R1 = GHC.Tuple.()_closure+1;
call (P64[(old + 8)])(R1) args: 8, res: 0, upd: 8;
}
}}}
The problem is that the code ends up looking like this:
{{{
# at this point rbp =