wanted: elide vector bounds checking for index with constant offsets

Bug #1830314 reported by 3b
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

sbcl can elide bounds checks when it knows (< index (length vector)), but not more complicated cases.

When writing an unrolled loop to iterate over a vector, it would be nice if it could also skip the checks when it knows index is less than length - N for some constant N, and access is (+ index M) for some M<N

for example:
(loop for i below (- (length v) 2) by 2
  sum (aref v i)
  sum (aref v (1+ i)))

(possibly a duplicate of bug #1830313 but filed separately since this needs to track ranges rather than just a transitive relation)

3b (00003b)
description: updated
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
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.