* [PATCH] fix kill_insn(OP_SETVAL)
@ 2020-11-21 17:16 Luc Van Oostenryck
0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2020-11-21 17:16 UTC (permalink / raw)
To: linux-sparse; +Cc: Luc Van Oostenryck
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-21 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 17:16 [PATCH] fix kill_insn(OP_SETVAL) Luc Van Oostenryck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.