Browse Source

Cleanup the use of `maybe_uextend` in the x64 lowerings (#5637)

Use maybe_uextend for the brnz lowerings on x64.
pull/5638/head
Trevor Elliott 2 years ago
committed by GitHub
parent
commit
a181ad2932
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      cranelift/codegen/src/isa/x64/lower.isle

11
cranelift/codegen/src/isa/x64/lower.isle

@ -2923,17 +2923,10 @@
(jmp_cond (CC.Z) taken not_taken))))
(rule 2 (lower_branch (brnz (icmp cc a b) _) (two_targets taken not_taken))
(rule 2 (lower_branch (brnz (maybe_uextend (icmp cc a b)) _) (two_targets taken not_taken))
(emit_side_effect (jmp_cond_icmp (emit_cmp cc a b) taken not_taken)))
(rule 2 (lower_branch (brnz (fcmp cc a b) _) (two_targets taken not_taken))
(let ((cmp FcmpCondResult (emit_fcmp cc a b)))
(emit_side_effect (jmp_cond_fcmp cmp taken not_taken))))
(rule 2 (lower_branch (brnz (uextend (icmp cc a b)) _) (two_targets taken not_taken))
(emit_side_effect (jmp_cond_icmp (emit_cmp cc a b) taken not_taken)))
(rule 2 (lower_branch (brnz (uextend (fcmp cc a b)) _) (two_targets taken not_taken))
(rule 2 (lower_branch (brnz (maybe_uextend (fcmp cc a b)) _) (two_targets taken not_taken))
(let ((cmp FcmpCondResult (emit_fcmp cc a b)))
(emit_side_effect (jmp_cond_fcmp cmp taken not_taken))))

Loading…
Cancel
Save