riscv64: Codemotion cleanups to ISLE files (#5984)
* riscv64: Fix typo in extensions * riscv64: Move converters to top of file * riscv64: Group up all imm12 rules * riscv64: Move zero_reg helpers to Physical Regs section * riscv64: Move helpers away from `clz` lowerings These were in the middle of the `clz` rules and are kind of distracting * riscv64: Move `cls` rules next to `ctz`/`clz` * cranelift: Move `u8_and` / `u32_add` to Primitive Arithmetic section * riscv64: Mark some imm12 constructors as pure * cranelift: Move `s32_add_fallible` next to `u32_add` * riscv64: Fix Typo
This commit is contained in:
@@ -336,8 +336,16 @@
|
||||
;;;; Rules for `clz` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty (clz x)))
|
||||
(lower_clz ty x))
|
||||
|
||||
(rule 1 (lower (has_type $I128 (clz x)))
|
||||
(lower_clz_i128 x))
|
||||
|
||||
;;;; Rules for `cls` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type (fits_in_64 ty) (cls x)))
|
||||
(lower_cls x ty))
|
||||
|
||||
(rule 1 (lower (has_type $I128 (cls x)))
|
||||
(lower_cls_i128 x))
|
||||
|
||||
;;;; Rules for `uextend` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type out_ty (uextend val @ (value_type in_ty))))
|
||||
@@ -447,13 +455,6 @@
|
||||
(lower_i128_rotr x y))
|
||||
|
||||
|
||||
;;;; Rules for `cls` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type (fits_in_64 ty) (cls x)))
|
||||
(lower_cls x ty))
|
||||
(rule 1 (lower (has_type $I128 (cls x)))
|
||||
(lower_cls_i128 x))
|
||||
|
||||
|
||||
;;;; Rules for `fabs` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(rule
|
||||
(lower (has_type ty (fabs x)))
|
||||
|
||||
Reference in New Issue
Block a user