aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-22 09:15:35 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-23 07:43:54 +0200
commitf46413ad4762335af4d3631636e6015c6501877a (patch)
tree2c2d78f21b3a0aba5b7569757d1e8167479a25d6
parentd99e1c4b72b2fda1bae2db1ba72385d9f380c160 (diff)
downloadsparse-dev-f46413ad4762335af4d3631636e6015c6501877a.tar.gz
add missing entry for OP_FNEG in kill_insn() & validate_insn()
These functions must have an entry for almost all instructions but OP_FNEG was missing. Fix this by adding the entry for OP_FNEG. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--ir.c2
-rw-r--r--simplify.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ir.c b/ir.c
index 205bd639..5116beaa 100644
--- a/ir.c
+++ b/ir.c
@@ -100,7 +100,7 @@ static int validate_insn(struct instruction *insn)
case OP_SCAST:
case OP_FPCAST:
case OP_PTRCAST:
- case OP_NOT: case OP_NEG:
+ case OP_NOT: case OP_NEG: case OP_FNEG:
case OP_SLICE:
case OP_SYMADDR:
case OP_PHISOURCE:
diff --git a/simplify.c b/simplify.c
index be720860..eabe63ca 100644
--- a/simplify.c
+++ b/simplify.c
@@ -256,7 +256,7 @@ int kill_insn(struct instruction *insn, int force)
case OP_FPCAST:
case OP_PTRCAST:
case OP_SETVAL:
- case OP_NOT: case OP_NEG:
+ case OP_NOT: case OP_NEG: case OP_FNEG:
case OP_SLICE:
kill_use(&insn->src1);
break;