Opened 15 years ago

Closed 15 years ago

Last modified 48 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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

Change History (3)

comment:1 Changed 15 years ago by nobody

Logged In: NO 

BTW, this bug is in 5.02 too.

comment:2 Changed 15 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 15 years ago by simonmar

Status: assignedclosed
Logged In: YES 

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.