 3 2 edge
 4 5 edge
 
-[ ] [ 0 get block>cfg value-numbering eliminate-dead-code ] unit-test
+[ ] [ 0 get block>cfg dup value-numbering eliminate-dead-code ] unit-test
 
 [ 1 ] [ 1 get instructions>> [ ##load-integer? ] count ] unit-test
 [ 1 ] [ 2 get instructions>> [ ##phi? ] count ] unit-test


test-diamond

[ ] [ 0 get block>cfg value-numbering drop ] unit-test

! First ##load-integer cannot be turned into a ##copy because
! the canonical leader for the value 100 is unavailable, but

: value-number-bb ( insns -- insns' )
    0 test-bb
    0 get block>cfg
    value-numbering
    0 get instructions>> ;

! Folding constants together
