From 8f6e1452572946b973e5140004ad31858c7f1e81 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 4 Jun 2023 11:45:35 +0900 Subject: [PATCH] [qfcc] Don't add target def for store statements Store statements dereference the pointer in target and thus don't modify target itself. --- tools/qfcc/source/statements.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index e5be663d9..1be1042d0 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -971,8 +971,10 @@ dereference_dst: s->opa = dst; s->opb = ofs; s->opc = src; - statement_add_def (s, copy_operand (target)); - statement_add_kill (s, target); + if (type != st_ptrassign) { + statement_add_def (s, copy_operand (target)); + statement_add_kill (s, target); + } sblock_add_statement (sblock, s); return sblock; }