Skip to content

Commit 6fd6658

Browse files
committed
add cmp_true
1 parent a37d69c commit 6fd6658

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cranelift/codegen/src/opts/arithmetic.isle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@
3333
(if-let false (i64_is_any_sign_power_of_two d))
3434
(apply_div_const_magic_s64 (Opcode.Srem) x d))
3535

36+
;; new way to represent True
37+
(decl cmp_true (Type) Value)
38+
(rule 0 (cmp_true (ty_int ty)) (iconst_u ty 1))
39+
(rule 1 (cmp_true (ty_vec128 ty)) (iconst_s ty -1))

0 commit comments

Comments
 (0)