mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
More thorough lowering of lognot to CPS
* module/language/tree-il/compile-cps.scm (canonicalize): Lower to a logxor with -1.
This commit is contained in:
parent
c2e7d834c2
commit
7aa4cfa9de
1 changed files with 6 additions and 2 deletions
|
@ -2385,9 +2385,13 @@ integer."
|
|||
;; if type folding can't prove Y to be an exact integer, then DCE
|
||||
;; would have to leave it in the program for its possible
|
||||
;; effects.
|
||||
(($ <primcall> src 'logand (x ($ <primcall> _ 'lognot (y))))
|
||||
(($ <primcall> src 'lognot (x))
|
||||
(make-primcall src 'logxor (list x (make-const src -1))))
|
||||
(($ <primcall> src 'logand
|
||||
(x ($ <primcall> _ 'logxor (y ($ <const> _ -1)))))
|
||||
(make-primcall src 'logsub (list x y)))
|
||||
(($ <primcall> src 'logand (($ <primcall> _ 'lognot (y)) x))
|
||||
(($ <primcall> src 'logand
|
||||
(($ <primcall> _ 'logxor (y ($ <const> _ -1))) x))
|
||||
(make-primcall src 'logsub (list x y)))
|
||||
|
||||
(($ <primcall> src 'throw ())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue