diff --git a/collects/tests/typed-scheme/optimizer/generic/inexact-complex-conjugate-top.rkt b/collects/tests/typed-scheme/optimizer/generic/inexact-complex-conjugate-top.rkt new file mode 100644 index 00000000..3e9b4090 --- /dev/null +++ b/collects/tests/typed-scheme/optimizer/generic/inexact-complex-conjugate-top.rkt @@ -0,0 +1,3 @@ +#lang typed/scheme #:optimize +(require racket/unsafe/ops) +(conjugate (+ 1.0+2.0i 2.0+4.0i)) diff --git a/collects/typed-scheme/optimizer/inexact-complex.rkt b/collects/typed-scheme/optimizer/inexact-complex.rkt index a3865450..8c47f7ee 100644 --- a/collects/typed-scheme/optimizer/inexact-complex.rkt +++ b/collects/typed-scheme/optimizer/inexact-complex.rkt @@ -139,7 +139,8 @@ #:with opt (begin (log-optimization "unary inexact complex" #'op) #'(op.unsafe n.opt))) - (pattern (~and exp (#%plain-app (~var op (float-op binary-inexact-complex-ops)) + (pattern (~and exp (#%plain-app (~or (~var op (float-op binary-inexact-complex-ops)) + (~and op (~literal conjugate))) e:inexact-complex-expr ...)) #:with exp*:unboxed-inexact-complex-opt-expr #'exp #:with opt