Add (bnot (bxor x y)) lowerings for s390x/aarch64 (#5763)
* Add (bnot (bxor x y)) lowerings for s390x/aarch64 I originally thought that s390x's original lowering in #5709, but as was rightfully pointed out `(bnot (bxor x y))` is equivalent to `(bxor x (bnot y))` so the special lowering for one should apply as a special lowering for the other. For the s390x and aarch64 backend that have already have a fused lowering of the bxor/bnot add a lowering additionally for the bnot/bxor combination. * Add bnot(bxor(..)) tests for s390x 128-bit sizes
This commit is contained in:
@@ -1052,6 +1052,11 @@
|
||||
(rule -2 (lower (has_type (ty_vec128 ty) (bnot x)))
|
||||
(not x (vector_size ty)))
|
||||
|
||||
;; Special-cases for fusing a bnot with bxor
|
||||
(rule 2 (lower (has_type (fits_in_64 ty) (bnot (bxor x y))))
|
||||
(alu_rs_imm_logic (ALUOp.EorNot) ty x y))
|
||||
(rule 3 (lower (has_type $I128 (bnot (bxor x y)))) (i128_alu_bitop (ALUOp.EorNot) $I64 x y))
|
||||
|
||||
;;;; Rules for `band` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule -1 (lower (has_type (fits_in_64 ty) (band x y)))
|
||||
|
||||
Reference in New Issue
Block a user