Opened 5 years ago

Closed 5 years ago

#7284 closed bug (fixed)

plusAddr# x 0 isn't optimised away

Reported by: rl Owned by: igloo
Priority: high Milestone: 7.8.1
Component: Compiler Version: 7.6.1
Keywords: Cc: dterei
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

As the title says, there doesn't seem to be an optimisation rule for this. I'm not sure if adding one to base (where exactly?) would be enough or if it should be a built-in one.

Change History (5)

comment:1 Changed 5 years ago by simonpj

difficulty: Unknown
Milestone: 7.8.1
Owner: set to igloo
Priority: normalhigh

comment:2 Changed 5 years ago by simonmar

This will disappear in the backend anyway (though I realise there are reasons to want it to disappear earlier).

comment:3 Changed 5 years ago by dterei

Cc: dterei added

comment:4 Changed 5 years ago by ian@…

commit b09352165101afb1d5f502350664dfc7a5bba10c

Author: Ian Lynagh <ian@well-typed.com>
Date:   Sun Oct 21 14:48:29 2012 +0100

    Add a rule for (plusAddr# x 0) == x; fixes #7284

 compiler/prelude/PrelRules.lhs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

comment:5 Changed 5 years ago by igloo

Resolution: fixed
Status: newclosed

Thanks for the report; fixed.

Note: See TracTickets for help on using tickets.