[Git][cmucl/cmucl][master] 2 commits: Address #336: Fix compiler warnings in srctran.lisp

Raymond Toy pushed to branch master at cmucl / cmucl Commits: a85f2a01 by Raymond Toy at 2024-07-17T16:44:16+00:00 Address #336: Fix compiler warnings in srctran.lisp - - - - - ba2176ab by Raymond Toy at 2024-07-17T16:44:27+00:00 Merge branch 'issue-336-1-fix-compiler-notes' into 'master' Address #336: Fix compiler warnings in srctran.lisp See merge request cmucl/cmucl!233 - - - - - 2 changed files: - src/compiler/srctran.lisp - src/compiler/x86/float-sse2.lisp Changes: ===================================== src/compiler/srctran.lisp ===================================== @@ -1809,8 +1809,7 @@ (round-it pos))))))) (defun round-derive-type-quot (number-type divisor-type) - (let* ((rem-type (rem-result-type number-type divisor-type)) - (number-interval (numeric-type->interval number-type)) + (let* ((number-interval (numeric-type->interval number-type)) (divisor-interval (numeric-type->interval divisor-type))) (let ((quot (round-quotient-bound (interval-div number-interval @@ -1819,9 +1818,7 @@ ,(or (interval-high quot) '*)))))) (defun round-derive-type-rem (number-type divisor-type) - (let* ((rem-type (rem-result-type number-type divisor-type)) - (number-interval (numeric-type->interval number-type)) - (divisor-interval (numeric-type->interval divisor-type))) + (let* ((rem-type (rem-result-type number-type divisor-type))) (multiple-value-bind (class format) (ecase rem-type (integer @@ -1835,13 +1832,6 @@ (values 'float nil)) (real (values nil nil))) - #+nil - (when (member rem-type '(float single-float double-float - #+long-float long-float - #+double-double double-double-float)) - (setf rem (interval-func #'(lambda (x) - (coerce x rem-type)) - rem))) (make-numeric-type :class class :format format :low nil ===================================== src/compiler/x86/float-sse2.lisp ===================================== @@ -773,10 +773,11 @@ (inst ,opinst x (,ea y))) (,stack-sc (inst ,opinst x (,ea-stack y))))) - ((and ,commutative (location= y r)) - ;; y = r and the operation is commutative, so just - ;; do the operation with r and x. - (inst ,opinst y x)) + ,@(when commutative + `(((location= y r) + ;; y = r and the operation is commutative, so just + ;; do the operation with r and x. + (inst ,opinst y x)))) ((not (location= r y)) ;; x, y, and r are three different regs. So just ;; move r to x and do the operation on r. @@ -1994,8 +1995,9 @@ `(cond ((location= x r) (inst ,opinst x y)) - ((and ,commutative (location= y r)) - (inst ,opinst y x)) + ,@(when commutative + `(((location= y r) + (inst ,opinst y x)))) ((not (location= r y)) (inst ,movinst r x) (inst ,opinst r y)) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5c8483f87814f4d2423fccb... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5c8483f87814f4d2423fccb... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)