A problem with jump tables and register spilling

Bug #1876485 reported by Stas Boukarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

(defun foo (x m)
  (declare (optimize (speed 2) (debug 1)))
  (case x
    ((a b c) 1
     (if m
         (error "a")))
    ((d e f)
     (print x)
     32)))

spills X only in the abc branch, but it reads it from the stack in the def branch:

(foo 'd  3)

#<unknown immediate object, lowtag=#b1001, widetag=#x59 {21A45A59}>
32

Revision history for this message
Stas Boukarev (stassats) wrote :

It's actually due to SB-C::*do-instcombine-pass*, setting it to NIL I get

; 9EF: 488B75F0 MOV RSI, [RBP-16]
; 9F3: L5: 488975F0 MOV [RBP-16], RSI

Changed in sbcl:
assignee: nobody → Stas Boukarev (stassats)
Stas Boukarev (stassats)
Changed in sbcl:
status: Triaged → Won't Fix
status: Won't Fix → Fix Committed
assignee: Stas Boukarev (stassats) → nobody
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.