From fe145ad2ef5947c37bcbfc802219c849576202d3 Mon Sep 17 00:00:00 2001 From: sofia Date: Mon, 21 Jul 2025 20:25:28 +0300 Subject: [PATCH] Fix comparisons not working for integers --- reid/src/codegen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reid/src/codegen.rs b/reid/src/codegen.rs index aab4cfb..142557f 100644 --- a/reid/src/codegen.rs +++ b/reid/src/codegen.rs @@ -641,7 +641,7 @@ impl mir::Expression { (mir::BinaryOperator::Mult, _, false) => Instr::Mul(lhs, rhs), (mir::BinaryOperator::Mult, _, true) => Instr::FMul(lhs, rhs), (mir::BinaryOperator::And, _, _) => Instr::And(lhs, rhs), - (mir::BinaryOperator::Cmp(i), _, true) => { + (mir::BinaryOperator::Cmp(i), _, false) => { Instr::ICmp(i.int_predicate(), lhs, rhs) } _ => todo!(),