From: Florian Krohm Date: Thu, 4 Sep 2025 13:01:52 +0000 (+0000) Subject: ir_opt.c: Fix mkZeroOfPrimopResultType X-Git-Tag: VALGRIND_3_26_0~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6902553f902e6845d92824383425aac022690bb8;p=thirdparty%2Fvalgrind.git 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) --- 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));