Opened 4 years ago

Closed 4 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:


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 4 years ago by simonpj

  • difficulty set to Unknown
  • Milestone set to 7.8.1
  • Owner set to igloo
  • Priority changed from normal to high

comment:2 Changed 4 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 4 years ago by dterei

  • Cc dterei added

comment:4 Changed 4 years ago by ian@…

commit b09352165101afb1d5f502350664dfc7a5bba10c

Author: Ian Lynagh <>
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 4 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the report; fixed.

Note: See TracTickets for help on using tickets.