Use andn for band_not when bmi1 is present (#5701)
We can use the andn instruction for the lowering of band_not on x64 when bmi1 is available.
This commit is contained in:
@@ -1103,12 +1103,17 @@
|
||||
(sse_and_not ty y x))
|
||||
|
||||
|
||||
(rule 1 (lower (has_type ty (band_not x y)))
|
||||
(rule 1 (lower (has_type ty @ (use_bmi1 $false) (band_not x y)))
|
||||
(if (ty_int_ref_scalar_64 ty))
|
||||
(x64_and ty
|
||||
x
|
||||
(x64_not ty y)))
|
||||
|
||||
(rule 1 (lower (has_type ty @ (use_bmi1 $true) (band_not x y)))
|
||||
(if (ty_int_ref_scalar_64 ty))
|
||||
;; the first argument is the one that gets inverted with andn
|
||||
(x64_andn ty y x))
|
||||
|
||||
|
||||
;;;; Rules for `bxor_not` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user