diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-04 07:33:45 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-04 07:38:04 +0200 |
| commit | 4e67727cdc1209ea374378b4446594576411c3b7 (patch) | |
| tree | bff67210ae57351639cb2209ac64b2aaceaaca52 | |
| parent | 73d0b20055c8ece79f19247bc49b87fd15616081 (diff) | |
| download | sparse-dev-4e67727cdc1209ea374378b4446594576411c3b7.tar.gz | |
fix missing handling of OP_FNEG
When introducing OP_FNEG a few cases have been missed
and so OP_FNEG are not always handled when needed.
Fix this by adding the missing 'case OP_FNEG:'
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | liveness.c | 2 | ||||
| -rw-r--r-- | simplify.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -71,7 +71,7 @@ static void track_instruction_usage(struct basic_block *bb, struct instruction * break; /* Uni */ - case OP_NOT: case OP_NEG: + case OP_NOT: case OP_NEG: case OP_FNEG: USES(src1); DEFINES(target); break; @@ -349,6 +349,7 @@ static int replace_with_pseudo(struct instruction *insn, pseudo_t pseudo) kill_use(&insn->src2); case OP_NOT: case OP_NEG: + case OP_FNEG: case OP_SYMADDR: case OP_CAST: case OP_SCAST: @@ -1207,7 +1208,7 @@ int simplify_instruction(struct instruction *insn) case OP_LSR: case OP_ASR: return simplify_binop(insn); - case OP_NOT: case OP_NEG: + case OP_NOT: case OP_NEG: case OP_FNEG: return simplify_unop(insn); case OP_LOAD: if (!has_users(insn->target)) |
