Skip to content

Commit

Permalink
cranelift: Use fits_in_64 in ireduce rule
Browse files Browse the repository at this point in the history
  • Loading branch information
afonso360 committed Jul 5, 2023
1 parent 3830624 commit 7cc9142
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cranelift/codegen/src/opts/cprop.isle
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
(iconst _ k2)))
(subsume (iconst ty (imm64_sshr ty k1 k2))))

;; No need to check fits_in_64 since iconst is only implemented for <= 64 bits.
(rule (simplify (ireduce narrow (iconst _ (u64_from_imm64 imm))))
(rule (simplify (ireduce narrow (iconst (fits_in_64 _) (u64_from_imm64 imm))))
(subsume (iconst narrow (imm64_masked narrow imm))))

(rule (simplify (uextend (fits_in_64 wide) (iconst narrow imm)))
Expand Down

0 comments on commit 7cc9142

Please sign in to comment.