22 Oct
2004
22 Oct
'04
6:20 p.m.
On Fri, Oct 22, 2004 at 07:45:32AM +0000, fool@sdf-eu.org wrote:
bla = (if True then (+) else (+)) 0 0
An elegant report. Here's another version: bla = (if True then id else negate) (1::Int) Unfortunately it seems to point at a whole class of longstanding bugs in the peephole optimizer: it takes no account of branch targets. (Here MKAP 1; MKAP 1 => MKAP 2, but the second MKAP was the target of a TEST branch.) Another of these optimizations was turned off two years ago for a similar reason, but they all seem similarly flawed.