From 6902553f902e6845d92824383425aac022690bb8 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 4 Sep 2025 13:01:52 +0000 Subject: [PATCH] ir_opt.c: Fix mkZeroOfPrimopResultType In c93dba5adbd5d I forgot to adjust mkZeroOfPrimopResultType. This function needs to go. See also 7270e04ab8eb7. I should be able to query IROp properties easily and for all IRops. E.g. instead of calling mkZeroOfPrimopResultType I want this: mkZero(irop->result_type) --- VEX/priv/ir_opt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VEX/priv/ir_opt.c b/VEX/priv/ir_opt.c index 1e4ba670e..9ed002ea4 100644 --- a/VEX/priv/ir_opt.c +++ b/VEX/priv/ir_opt.c @@ -1243,7 +1243,9 @@ static Bool notBool ( Bool b ) static IRExpr* mkZeroOfPrimopResultType ( IROp op ) { switch (op) { + case Iop_Sub8: case Iop_Xor8: return IRExpr_Const(IRConst_U8(0)); + case Iop_Sub16: case Iop_Xor16: return IRExpr_Const(IRConst_U16(0)); case Iop_Sub32: case Iop_Xor32: return IRExpr_Const(IRConst_U32(0)); -- 2.47.3