mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Fix bug in eq-constant? propagation in CSE if kf == kt
* module/language/cps/cse.scm (compute-out-edges): Only propagate constant to successor if successor not kf. * test-suite/tests/compiler.test ("cse auxiliary definitions"): ("closure conversion"): Refactor. ("constant propagation"): New test. Fixes #48368.
This commit is contained in:
parent
f499754bc8
commit
17aab66e75
2 changed files with 66 additions and 62 deletions
|
@ -360,9 +360,9 @@ for a label, it isn't known to be constant at that label."
|
|||
(_ bool))
|
||||
(match (and (< pred succ) (intmap-ref out pred))
|
||||
(($ $kargs _ _ ($ $branch kf kt src 'eq-constant? c (v)))
|
||||
(if (eqv? kt succ)
|
||||
(adjoin-constant consts v c)
|
||||
consts))
|
||||
(if (eqv? kf succ)
|
||||
consts
|
||||
(adjoin-constant consts v c)))
|
||||
(_ consts)))))))
|
||||
|
||||
(define (propagate-analysis analysis label out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue