From 463602cf0d05b108bbd3dcf115d6ea064c61dbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ada=20Gottenstr=C3=A4ter?= Date: Thu, 23 Nov 2023 16:25:43 +0100 Subject: [PATCH] Add missing size==4 check --- backends/asm/optimize_ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/asm/optimize_ir.c b/backends/asm/optimize_ir.c index a241e90bc..1a18cb965 100644 --- a/backends/asm/optimize_ir.c +++ b/backends/asm/optimize_ir.c @@ -4637,7 +4637,7 @@ OptimizeReadWrite(IRList *irl) if (nextread && CondIsSubset(ir->cond,nextread->cond)) { // wrlong a, b ... rdlong c, b -> mov c, a // rdlong a, b ... rdlong c, b -> mov c, a - if(size == nextsize && (!write || size==4 || gl_p2) && (gl_p2 || !InstrSetsFlags(nextread,FLAG_WC)) ) { + if(size == nextsize && (!write || size==4 || gl_p2) && ((gl_p2 && size==4) || !InstrSetsFlags(nextread,FLAG_WC)) ) { nextread->src = dst1; if (!write || size == 4) { ReplaceOpcode(nextread, OPC_MOV);