diff --git a/cranelift-backend/src/lib.rs b/cranelift-backend/src/lib.rs index 5f56c5c6..920d27c6 100644 --- a/cranelift-backend/src/lib.rs +++ b/cranelift-backend/src/lib.rs @@ -648,8 +648,10 @@ impl FuncBuilder<'_, '_> { let [lh, rh] = [self.value_of(lhs), self.value_of(rhs)]; let is_int_op = node.ty.is_integer() + || node.ty.is_pointer() || (node.ty == hbty::Id::BOOL && (self.nodes[lhs].ty.is_integer() + || node.ty.is_pointer() || self.nodes[lhs].ty == hbty::Id::BOOL)); let is_float_op = node.ty.is_float() || (node.ty == hbty::Id::BOOL && self.nodes[lhs].ty.is_float());