Skip to content

Commit

Permalink
Update jit.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Sep 21, 2023
1 parent d35e2fb commit fb722ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ impl<'a> FunctionTranslator<'a> {
let lhs = self.translate_expr(lhs_id, decl, decls);
let rhs = self.translate_expr(rhs_id, decl, decls);
let t = decl.types[lhs_id];
if *t == crate::types::Type::Int32 || *t == crate::types::Type::Bool {
if *t == crate::types::Type::Int32 || *t == crate::types::Type::Bool || *t == crate::types::Type::Int8 {
self.builder.ins().icmp(IntCC::NotEqual, lhs, rhs)
} else if *t == crate::types::Type::Float32 {
} else if *t == crate::types::Type::Float32 || *t == crate::types::Type::Float64 {
self.builder.ins().fcmp(FloatCC::NotEqual, lhs, rhs)
} else {
todo!()
Expand Down

0 comments on commit fb722ca

Please sign in to comment.