diff mbox

[07/16] fix killing of otherwise not-handled instructions

Message ID 20170216045708.50661-8-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Luc Van Oostenryck Feb. 16, 2017, 4:56 a.m. UTC
The instructions which are otherwise not handled in
kill_instruction() were simply ignored  but they must
still have their ->bb set to NULL.

Fix this by separating the default case from OP_ENTRY,
the only kind that must be ignored in all circonstances.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 simplify.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/simplify.c b/simplify.c
index 82ae97ae9..1fbad1060 100644
--- a/simplify.c
+++ b/simplify.c
@@ -228,9 +228,11 @@  void kill_instruction(struct instruction *insn)
 		break;
 
 	case OP_ENTRY:
-	default:
 		/* ignore */
 		return;
+
+	default:
+		break;
 	}
 
 	insn->bb = NULL;