diff mbox series

[2/2] simplify kill_insn() of unops and unop-ish instructions

Message ID 20201121224657.96038-3-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series cleanup REPEAT_SYMBOL_CLEANUP & kill_insn() | expand

Commit Message

Luc Van Oostenryck Nov. 21, 2020, 10:46 p.m. UTC
In instructions, the first pseudo operands exist under different
names (.src1, .src, .cond, .phi_src) all aliased to each other.

Use this to simplify unops and others instructions with a single
pseudo operand.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 simplify.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/simplify.c b/simplify.c
index 465624f72677..4508c6d54386 100644
--- a/simplify.c
+++ b/simplify.c
@@ -324,24 +324,16 @@  int kill_insn(struct instruction *insn, int force)
 
 	case OP_UNOP ... OP_UNOP_END:
 	case OP_SLICE:
-		kill_use(&insn->src1);
-		break;
-
-	case OP_PHI:
-		kill_use_list(insn->phi_list);
-		break;
 	case OP_PHISOURCE:
-		kill_use(&insn->phi_src);
-		break;
-
 	case OP_SYMADDR:
-		kill_use(&insn->src);
-		break;
-
 	case OP_CBR:
 	case OP_SWITCH:
 	case OP_COMPUTEDGOTO:
-		kill_use(&insn->cond);
+		kill_use(&insn->src1);
+		break;
+
+	case OP_PHI:
+		kill_use_list(insn->phi_list);
 		break;
 
 	case OP_CALL: