[PATCH] fix missing handling of OP_FNEG

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

 



When introducing OP_FNEG a few cases have been missed
and so OP_FNEG are not always handled when needed.

Fix this by adding the missing 'case OP_FNEG:'

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 liveness.c | 2 +-
 simplify.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/liveness.c b/liveness.c
index d85cea394..e0e583292 100644
--- a/liveness.c
+++ b/liveness.c
@@ -71,7 +71,7 @@ static void track_instruction_usage(struct basic_block *bb, struct instruction *
 		break;
 
 	/* Uni */
-	case OP_NOT: case OP_NEG:
+	case OP_NOT: case OP_NEG: case OP_FNEG:
 		USES(src1); DEFINES(target);
 		break;
 
diff --git a/simplify.c b/simplify.c
index 78ba9c61f..cafa6e2c8 100644
--- a/simplify.c
+++ b/simplify.c
@@ -349,6 +349,7 @@ static int replace_with_pseudo(struct instruction *insn, pseudo_t pseudo)
 		kill_use(&insn->src2);
 	case OP_NOT:
 	case OP_NEG:
+	case OP_FNEG:
 	case OP_SYMADDR:
 	case OP_CAST:
 	case OP_SCAST:
@@ -1207,7 +1208,7 @@ int simplify_instruction(struct instruction *insn)
 	case OP_LSR: case OP_ASR:
 		return simplify_binop(insn);
 
-	case OP_NOT: case OP_NEG:
+	case OP_NOT: case OP_NEG: case OP_FNEG:
 		return simplify_unop(insn);
 	case OP_LOAD:
 		if (!has_users(insn->target))
-- 
2.16.3

--
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