diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-23 11:41:34 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-25 11:38:16 +0200 |
| commit | d95d9a999d06cc5c90b10807975b904584beb4ea (patch) | |
| tree | bf2f3e4976ba27a16df2cf55310a8bbdece33d61 | |
| parent | b03237b8deef238a1321752fe4d401f10934f084 (diff) | |
| download | sparse-dev-d95d9a999d06cc5c90b10807975b904584beb4ea.tar.gz | |
kill dead OP_FADD & friends
The floating-point binops (OP_FADD, ...) are never simplified.
They are thus absent from simplify_instruction() and as such they are
never removed if dead.
Fix this by adding them to simplify_instruction() but only do
the usual check with dead_insn().
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | simplify.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1250,6 +1250,13 @@ int simplify_instruction(struct instruction *insn) return simplify_switch(insn); case OP_RANGE: return simplify_range(insn); + case OP_FADD: + case OP_FSUB: + case OP_FMUL: + case OP_FDIV: + if (dead_insn(insn, &insn->src1, &insn->src2, NULL)) + return REPEAT_CSE; + break; } return 0; } |
