[PATCH] kill dead OP_FADD & friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 simplify.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/simplify.c b/simplify.c
index 741b1272c..4c3b3dbc4 100644
--- a/simplify.c
+++ b/simplify.c
@@ -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;
 }
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux