From 786e3e6bfd63f11906b9f02d80650dfb9369635a Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Mon, 30 Dec 2024 14:57:03 +0100 Subject: [PATCH] forgot about pointers Signed-off-by: Jakub Doka --- cranelift-backend/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) 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());