Files
mercury/tests/hard_coded/rnd.exp
Zoltan Somogyi 5e333f4424 Fix a bug that broke Tom's implementation of a random number generator at -O6.
Estimated hours taken: 3

Fix a bug that broke Tom's implementation of a random number generator at -O6.
The bug appeared only if value numbering is run for a second time after most
other low-level optimizations have been repeated several times. The problem
was that the first invocation of value numbering introduces a temp variable,
and the second one deletes the assignment to the temp variable because an
if_val with a liveness annotation comes between this assignment and the
first use of the temp variable.

compiler/livemap.m:
	When an if_val is preceded by a livevals annotation,
	do not replace the current liveness with the contents
	of the annotation. Instead, just include the contents
	of the annotation in the current set of live lvals.

tests/hard_coded/rnd.{m,exp}:
	Tom's test case.

tests/hard_coded/Mmakefile:
	Always run Tom's test case at -O6.
1998-02-18 03:24:46 +00:00

11 lines
29 B
Plaintext