diff --git a/cranelift/codegen/src/isa/aarch64/inst.isle b/cranelift/codegen/src/isa/aarch64/inst.isle index 5f08f68387..f4248d5f94 100644 --- a/cranelift/codegen/src/isa/aarch64/inst.isle +++ b/cranelift/codegen/src/isa/aarch64/inst.isle @@ -1614,9 +1614,6 @@ (decl imm12_from_u64 (Imm12) u64) (extern extractor imm12_from_u64 imm12_from_u64) -(decl pure make_imm12_from_u64 (u64) Imm12) -(extern constructor make_imm12_from_u64 make_imm12_from_u64) - (decl u8_into_uimm5 (u8) UImm5) (extern constructor u8_into_uimm5 u8_into_uimm5) @@ -3483,12 +3480,12 @@ (rule (lower_icmp_const (IntCC.UnsignedGreaterThanOrEqual) a b ty) (if (ty_int_ref_scalar_64 ty)) (if-let $true (u64_is_odd b)) - (if-let imm (make_imm12_from_u64 (u64_sub b 1))) + (if-let (imm12_from_u64 imm) (u64_sub b 1)) (flags_and_cc (cmp_imm (operand_size ty) a imm) (IntCC.UnsignedGreaterThan))) (rule (lower_icmp_const (IntCC.SignedGreaterThanOrEqual) a b ty) (if (ty_int_ref_scalar_64 ty)) (if-let $true (u64_is_odd b)) - (if-let imm (make_imm12_from_u64 (u64_sub b 1))) + (if-let (imm12_from_u64 imm) (u64_sub b 1)) (flags_and_cc (cmp_imm (operand_size ty) a imm) (IntCC.SignedGreaterThan))) (rule -1 (lower_icmp_const cond rn (imm12_from_u64 c) ty) diff --git a/cranelift/codegen/src/isa/aarch64/lower/isle.rs b/cranelift/codegen/src/isa/aarch64/lower/isle.rs index 5d7ea9b10a..e47e3fc6b1 100644 --- a/cranelift/codegen/src/isa/aarch64/lower/isle.rs +++ b/cranelift/codegen/src/isa/aarch64/lower/isle.rs @@ -129,10 +129,6 @@ impl Context for IsleContext<'_, '_, MInst, Flags, IsaFlags, 6> { Imm12::maybe_from_u64(n) } - fn make_imm12_from_u64(&mut self, n: u64) -> Option { - Imm12::maybe_from_u64(n) - } - fn imm12_from_negated_u64(&mut self, n: u64) -> Option { Imm12::maybe_from_u64((n as i64).wrapping_neg() as u64) }