From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH] fix kill_insn(OP_SETVAL)
Date: Sat, 21 Nov 2020 18:16:29 +0100 [thread overview]
Message-ID: <20201121171629.93454-1-luc.vanoostenryck@gmail.com> (raw)
When killing OP_SETVAL's, kill_use(&insn->src1) is called to
remove the usage of its first operand but OP_SETVAL has no
such operand.
Fix this by moving the corresponding entry with OP_SETFVAL and
others instruction without operands.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
simplify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/simplify.c b/simplify.c
index a0e23d6de01f..4d0adf444e17 100644
--- a/simplify.c
+++ b/simplify.c
@@ -325,7 +325,6 @@ int kill_insn(struct instruction *insn, int force)
/* fall through */
case OP_UNOP ... OP_UNOP_END:
- case OP_SETVAL:
case OP_SLICE:
kill_use(&insn->src1);
break;
@@ -380,6 +379,7 @@ int kill_insn(struct instruction *insn, int force)
case OP_BR:
case OP_SETFVAL:
+ case OP_SETVAL:
default:
break;
}
--
2.29.2
reply other threads:[~2020-11-21 17:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201121171629.93454-1-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).