diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-01-29 11:48:01 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-13 09:34:45 +0800 |
| commit | b5e06b1c455c544e43dbe14badbef0fd07687d64 (patch) | |
| tree | c87a8c60b032ad362ac79d6d26b69c9884b02f9b | |
| parent | 9cc8f66242b401b60dff799034384f6bd76fbff3 (diff) | |
| download | sparse-dev-b5e06b1c455c544e43dbe14badbef0fd07687d64.tar.gz | |
fix crash while testing between conditional & unconditional OP_BR
It seems that testing for a NULL insn->cond is not the right test,
what must be done is to test if either of ->bb_{true,false} is NULL.
Fixes: 556dbc8d75 ("Update usage chain for dead instructions")
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
| -rw-r--r-- | simplify.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -221,7 +221,7 @@ void kill_instruction(struct instruction *insn) case OP_BR: insn->bb = NULL; repeat_phase |= REPEAT_CSE; - if (insn->cond) + if (insn->bb_true && insn->bb_false) kill_use(&insn->cond); return; } |
