fix ##load-constant/##scalar>vector folding when constant is a fixnum
parent
ea051063a4
commit
47cfb7d3a5
|
@ -459,7 +459,7 @@ M: ##shuffle-vector rewrite
|
|||
value>> over rep>> {
|
||||
{ float-4-rep [ float>bits 4 >le (fold-scalar>vector) ] }
|
||||
{ double-2-rep [ double>bits 8 >le (fold-scalar>vector) ] }
|
||||
[ rep-component-type heap-size >le (fold-scalar>vector) ]
|
||||
[ [ untag-fixnum ] dip rep-component-type heap-size >le (fold-scalar>vector) ]
|
||||
} case ;
|
||||
|
||||
M: ##scalar>vector rewrite
|
||||
|
|
|
@ -4,7 +4,7 @@ cpu.architecture tools.test kernel math combinators.short-circuit
|
|||
accessors sequences compiler.cfg.predecessors locals compiler.cfg.dce
|
||||
compiler.cfg.ssa.destruction compiler.cfg.loop-detection
|
||||
compiler.cfg.representations compiler.cfg assocs vectors arrays
|
||||
layouts namespaces alien ;
|
||||
layouts literals namespaces alien ;
|
||||
IN: compiler.cfg.value-numbering.tests
|
||||
|
||||
: trim-temps ( insns -- insns )
|
||||
|
@ -1215,6 +1215,20 @@ cell 8 = [
|
|||
} value-numbering-step
|
||||
] unit-test
|
||||
|
||||
[
|
||||
{
|
||||
T{ ##load-constant f 0 $[ 55 tag-fixnum ] }
|
||||
T{ ##load-constant f 1 B{ 55 0 0 0 55 0 0 0 55 0 0 0 55 0 0 0 } }
|
||||
T{ ##copy f 2 1 any-rep }
|
||||
}
|
||||
] [
|
||||
{
|
||||
T{ ##load-constant f 0 $[ 55 tag-fixnum ] }
|
||||
T{ ##scalar>vector f 1 0 int-4-rep }
|
||||
T{ ##shuffle-vector f 2 1 { 0 0 0 0 } float-4-rep }
|
||||
} value-numbering-step
|
||||
] unit-test
|
||||
|
||||
[
|
||||
{
|
||||
T{ ##load-constant f 0 1.25 }
|
||||
|
|
|
@ -129,6 +129,8 @@ CONSTANT: simd-classes
|
|||
|
||||
[ HEX: ffffffff ] [ HEX: ffffffff [ uint-4-with ] compile-call first ] unit-test
|
||||
|
||||
[ HEX: ffffffff ] [ [ HEX: ffffffff uint-4-with ] compile-call first ] unit-test
|
||||
|
||||
"== Checking -boa constructors" print
|
||||
|
||||
[ { } ] [
|
||||
|
|
|
@ -27,6 +27,9 @@ SYMBOL: mega-cache-size
|
|||
: tag-fixnum ( n -- tagged )
|
||||
tag-bits get shift ;
|
||||
|
||||
: untag-fixnum ( n -- tagged )
|
||||
tag-bits get neg shift ;
|
||||
|
||||
! We do this in its own compilation unit so that they can be
|
||||
! folded below
|
||||
<<
|
||||
|
|
Loading…
Reference in New Issue