]> gcc.gnu.org Git - gcc.git/commitdiff
(record_jump_cond): Don't do anything if OP0 and OP1 are already
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 25 Aug 1994 23:21:18 +0000 (19:21 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 25 Aug 1994 23:21:18 +0000 (19:21 -0400)
equivalent.

From-SVN: r7984

gcc/cse.c

index 4902b897976f0455b251739b6fff98f227004f4b..a4de3477ebbf9f61f673f7306df8af9764511b89 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5805,6 +5805,13 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality)
   op0_elt = lookup (op0, op0_hash, mode);
   op1_elt = lookup (op1, op1_hash, mode);
 
+  /* If both operands are already equivalent or if they are not in the
+     table but are identical, do nothing.  */
+  if ((op0_elt != 0 && op1_elt != 0
+       && op0_elt->first_same_value == op1_elt->first_same_value)
+      || op0 == op1 || rtx_equal_p (op0, op1))
+    return;
+
   /* If we aren't setting two things equal all we can do is save this
      comparison.   Similarly if this is floating-point.  In the latter
      case, OP1 might be zero and both -0.0 and 0.0 are equal to it.
This page took 0.080544 seconds and 5 git commands to generate.