Opened 13 years ago

Closed 13 years ago

Last modified 46 years ago

#88 closed bug (Fixed)

-O2 generates wrong code

Reported by: nobody Owned by: simonpj
Priority: normal Milestone:
Component: Compiler Version: 5.04.1
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

I have a program (the Bluespec compiler), where using
-O2 generates a program that loops (or at least is VERY
slow), whereas not using generates a working program.

I can't really give you the source code, but perhaps
you can contact me and we can see if we can work
something out.

  -- Lennart

[email protected]

Change History (3)

comment:1 Changed 13 years ago by nobody

Logged In: NO 

BTW, this bug is in 5.02 too.

comment:2 Changed 13 years ago by nobody

Logged In: NO 

Further investigations show that the generated code is not
looping, it is indeed correct, but it's just been incredibly
pessimised.  On a smaller example the unoptmized code
finishes in 0.02s and the optmized code in 18s.
It seem that the complexity of the (very complicated)
algorithm has suddenly become exponential with -O2.

comment:3 Changed 13 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 
user_id=48280

Fixed in rev. 1.140 of Simplify.lhs, fix will be in 5.04.3 (if we 
release it).
Note: See TracTickets for help on using tickets.