diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 17:46:50 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-21 17:47:34 +0100 |
commit | 641cf2c295285ee15f35dbcfd85367ca61259be0 (patch) | |
tree | c6decf8ca1df56afa93f1ef61eb83537cc6ead63 | |
parent | b59dbdaf37400cc57e21f8b4bc72a8092d0a2332 (diff) | |
download | sparse-641cf2c295285ee15f35dbcfd85367ca61259be0.tar.gz |
fix kill_insn(OP_SETVAL)
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>
-rw-r--r-- | simplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |