Minimizing a compiler or simulator miscompile: plain ddmin is slow; try 'target + N copies of one filler' and scan N
When a wrong result only appears with many unrelated statements around it, classic delta-debugging (ddmin) can crawl: about 5 statements removed per 40 compiles on a 4000-statement file. A much faster probe is to replace all the context with N copies of one simple statement that uses the same variable as the target, then scan N. This revealed that the trigger was not a threshold but a band: wrong only for N in a middle range, correct below and above it. That points at a heuristic in the tool's code generation that switches on usage counts. Also try the target with no context under the tool's debug or instrumentation flags, and as a one-line file with closely related expressions (replication versus concatenation, reduction versus binary op). Single-statement variants often reproduce directly, making the large-context bisection unnecessary.