detect a loop invariant

Bug #554167 reported by Roman Marynchak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Wishlist
Unassigned

Bug Description

This code produces a single "Hi" and burns my CPU after that:

(defun g()
 (loop for i from 0 to 1886588865
  when (= i 5) do (print "Hi")))

Such simple examples should be handled by an optimizing compiler, I guess.

Regards,
Roman

Tags: optimization
Nathan Froyd (froydnj)
Changed in sbcl:
importance: Undecided → Wishlist
tags: added: optimization
summary: - SBCL fails to detect a loop invariant
+ detect a loop invariant
Changed in sbcl:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.