Make float complex multiplication not optimize on number expressions.

This commit is contained in:
Eric Dobson 2013-09-17 09:44:33 -07:00
parent 161da0a2eb
commit fda570e915
3 changed files with 18 additions and 2 deletions

View File

@ -151,7 +151,7 @@
c1:unboxed-float-complex-opt-expr c1:unboxed-float-complex-opt-expr
c2:unboxed-float-complex-opt-expr c2:unboxed-float-complex-opt-expr
cs:unboxed-float-complex-opt-expr ...) cs:unboxed-float-complex-opt-expr ...)
#:when (or (subtypeof? this-syntax -FloatComplex) (subtypeof? this-syntax -Number)) #:when (subtypeof? this-syntax -FloatComplex)
#:with (real-binding imag-binding) (binding-names) #:with (real-binding imag-binding) (binding-names)
#:do [(log-unboxing-opt "unboxed binary float complex")] #:do [(log-unboxing-opt "unboxed binary float complex")]
#:with (bindings ...) #:with (bindings ...)

View File

@ -1,7 +1,7 @@
#;#; #;#;
#<<END #<<END
TR opt: float-complex-i.rkt 17:0 (+ 1.0+2.0i (* 0+1.0i 2.0+4.0i)) -- unboxed binary float complex TR opt: float-complex-i.rkt 17:0 (+ 1.0+2.0i (* 0+1.0i 2.0+4.0i)) -- unboxed binary float complex
TR opt: float-complex-i.rkt 17:12 (* 0+1.0i 2.0+4.0i) -- unboxed binary float complex TR opt: float-complex-i.rkt 17:12 (* 0+1.0i 2.0+4.0i) -- unbox complex
TR opt: float-complex-i.rkt 17:15 0+1.0i -- unboxed literal TR opt: float-complex-i.rkt 17:15 0+1.0i -- unboxed literal
TR opt: float-complex-i.rkt 17:21 2.0+4.0i -- unboxed literal TR opt: float-complex-i.rkt 17:21 2.0+4.0i -- unboxed literal
TR opt: float-complex-i.rkt 17:3 1.0+2.0i -- unboxed literal TR opt: float-complex-i.rkt 17:3 1.0+2.0i -- unboxed literal

View File

@ -0,0 +1,16 @@
#;#;
#<<END
TR opt: float-complex-number-mul.rkt 16:0 (imag-part (* 0.0+1.0i (* 1 2))) -- complex accessor elimination
TR opt: float-complex-number-mul.rkt 16:11 (* 0.0+1.0i (* 1 2)) -- unboxed binary float complex
TR opt: float-complex-number-mul.rkt 16:14 0.0+1.0i -- unboxed literal
TR opt: float-complex-number-mul.rkt 16:23 (* 1 2) -- fixnum bounded expr
TR opt: float-complex-number-mul.rkt 16:23 (* 1 2) -- float-arg-expr in complex ops
TR opt: float-complex-number-mul.rkt 16:26 1 -- float-arg-expr in complex ops
TR opt: float-complex-number-mul.rkt 16:28 2 -- float-arg-expr in complex ops
END
#<<END
2.0
END
#lang typed/racket
(imag-part (* 0.0+1.0i (* 1 2)))