Add some minor souper-harvested optimizations (#5735)
I was playing around with souper recently on some wasms I had lying around and these are some optimization opportunities that popped out which seemed easy-enough to add to the egraph-based optimizations.
This commit is contained in:
@@ -110,6 +110,10 @@
|
||||
(bxor ty k @ (iconst ty _) x))
|
||||
(bxor ty x k))
|
||||
|
||||
(rule (simplify
|
||||
(icmp ty cc k @ (iconst _ _) x))
|
||||
(icmp ty (intcc_reverse cc) x k))
|
||||
|
||||
;; Canonicalize via associativity: reassociate to a right-heavy tree
|
||||
;; for constants.
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user