code wiki / (root) / _mulcse_minrepro.nx

_mulcse_minrepro.nx

buildroot/runtime/_mulcse_minrepro.nx

1152 B32 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

_mulcse_minrepro.nx -- COMPILER DEFECT min-repro (2026-06-10, found by nx_worldgen_tuner_test KAT4 + _ts_diag): in a function whose first statement builds a chained multiply from a PARAM (`grade * lw * lw`), a later `s = s + <call>() * lw` emits <call>*lw*lw -- the doubled multiply chain is wrongly reused (CSE/opt suspected). The all-literal local form does NOT reproduce (T1); the param+call form does (T2). Workaround that compiles right: hoist lw2 = lw*lw and each product into its own `let` (see tl_score in nx_worldgen_tunelib.nx). Exit 0 = compiler correct; exit 1 = T2 miscompile; exit 2 = T1 (new).

dependencies 1 imports · 0 importers

nx_syscalls.nx _mulcse_minrepro.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mr_score mr_axis

structs

none

consts

none

functions

12func mr_axis() -> i64 { return 16384 }
called by 1: mr_score
14func mr_score(grade: i64) -> i64
called by 1: main calls 1: mr_axis
21func main() -> i64
calls 1: mr_score