jump.c (jump_optimize_1): Amend last change to test only the form of the operand...
authorRichard Henderson <rth@cygnus.com>
Fri, 1 Oct 1999 01:13:51 +0000 (18:13 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 1 Oct 1999 01:13:51 +0000 (18:13 -0700)
        * jump.c (jump_optimize_1): Amend last change to test only the
        form of the operand, not the insn.

From-SVN: r29741

gcc/ChangeLog
gcc/jump.c

index 605e26cb816db50280d8049a0a700aa72fe971e9..34656de2a12b7cb5304d6885c49c624eb673a65b 100644 (file)
@@ -1,5 +1,8 @@
 Thu Sep 30 18:04:13 1999  Richard Henderson  <rth@cygnus.com>
 
+       * jump.c (jump_optimize_1): Amend last change to test only the
+       form of the operand, not the insn.
+
        * jump.c (jump_optimize_1) [conditional_move]: Use general_operand
        not register_operand to determine when B may need preloading.
 
index 377cfc966901a42214a7f01b2ce0a0334e1b0c9d..dcd1a6a5c33768908930dbbb1352681440470464 100644 (file)
@@ -1169,11 +1169,11 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
 
                start_sequence ();
 
-               /* If we're not dealing with a simple operand or the insn is
-                  more complex than a simple SET, duplicate the computation
-                  and replace the destination with a new temporary.  */
-               if (general_operand (temp2, GET_MODE (var))
-                   && GET_CODE (PATTERN (temp)) == SET)
+               /* We're dealing with a single_set insn with no side effects
+                  on SET_SRC.  We do need to be reasonably certain that if
+                  we need to force BVAL into a register that we won't 
+                  clobber the flags -- general_operand should suffice.  */
+               if (general_operand (temp2, GET_MODE (var)))
                  bval = temp2;
                else
                  {
@@ -1183,7 +1183,7 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
                    SET_DEST (temp6) = bval;
                    emit_insn (PATTERN (new_insn));
                  }
-                 
+
                target = emit_conditional_move (var, code,
                                                cond0, cond1, VOIDmode,
                                                aval, bval, GET_MODE (var),