OSDN Git Service

* ifcvt.c (noce_emit_store_flag, noce_try_store_flag_constants,
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Feb 2001 16:20:43 +0000 (16:20 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Feb 2001 16:20:43 +0000 (16:20 +0000)
noce_try_store_flag_inc, noce_try_store_flag_mask,
noce_try_cmove_arith):
Use reversed_comparison_code instead of reverse_comparison and
can_reverse_comparison_p.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40119 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ifcvt.c

index b8a2020..9517123 100644 (file)
@@ -1,3 +1,11 @@
+Wed Feb 28 17:19:28 CET 2001  Jan Hubicka  <jh@suse.cz.
+
+       * ifcvt.c (noce_emit_store_flag, noce_try_store_flag_constants,
+       noce_try_store_flag_inc, noce_try_store_flag_mask,
+       noce_try_cmove_arith):
+       Use reversed_comparison_code instead of reverse_comparison and
+       can_reverse_comparison_p.
+
 Wed Feb 28 17:17:29 CET 2001  Jan Hubicka  <jh@suse.cz>
 
        * jump.c (reversed_comparison_code_parts): Allow reversal of
index c5778e1..fd934b5 100644 (file)
@@ -496,15 +496,16 @@ noce_emit_store_flag (if_info, x, reversep, normalize)
   if (cond_complex)
     cond = XEXP (SET_SRC (pc_set (if_info->jump)), 0);
 
+  if (reversep)
+    code = reversed_comparison_code (cond, if_info->jump);
+  else
+    code = GET_CODE (cond);
+
   if ((if_info->cond_earliest == if_info->jump || cond_complex)
       && (normalize == 0 || STORE_FLAG_VALUE == normalize))
     {
       rtx tmp;
 
-      code = GET_CODE (cond);
-      if (reversep)
-       code = reverse_condition (code);
-
       tmp = gen_rtx_fmt_ee (code, GET_MODE (x), XEXP (cond, 0),
                            XEXP (cond, 1));
       tmp = gen_rtx_SET (VOIDmode, x, tmp);
@@ -530,10 +531,6 @@ noce_emit_store_flag (if_info, x, reversep, normalize)
   if (cond_complex)
     return NULL_RTX;
 
-  code = GET_CODE (cond);
-  if (reversep)
-    code = reverse_condition (code);
-
   return emit_store_flag (x, code, XEXP (cond, 0),
                          XEXP (cond, 1), VOIDmode,
                          (code == LTU || code == LEU
@@ -560,7 +557,8 @@ noce_try_store_flag (if_info)
   else if (if_info->b == const0_rtx
           && GET_CODE (if_info->a) == CONST_INT
           && INTVAL (if_info->a) == STORE_FLAG_VALUE
-          && can_reverse_comparison_p (if_info->cond, if_info->jump))
+          && (reversed_comparison_code (if_info->cond, if_info->jump)
+              != UNKNOWN))
     reversep = 1;
   else
     return FALSE;
@@ -605,7 +603,8 @@ noce_try_store_flag_constants (if_info)
       itrue = INTVAL (if_info->b);
       diff = itrue - ifalse;
 
-      can_reverse = can_reverse_comparison_p (if_info->cond, if_info->jump);
+      can_reverse = (reversed_comparison_code (if_info->cond, if_info->jump)
+                    != UNKNOWN);
 
       reversep = 0;
       if (diff == STORE_FLAG_VALUE || diff == -STORE_FLAG_VALUE)
@@ -729,7 +728,8 @@ noce_try_store_flag_inc (if_info)
       && (XEXP (if_info->a, 1) == const1_rtx
          || XEXP (if_info->a, 1) == constm1_rtx)
       && rtx_equal_p (XEXP (if_info->a, 0), if_info->x)
-      && can_reverse_comparison_p (if_info->cond, if_info->jump))
+      && (reversed_comparison_code (if_info->cond, if_info->jump)
+         != UNKNOWN))
     {
       if (STORE_FLAG_VALUE == INTVAL (XEXP (if_info->a, 1)))
        subtract = 0, normalize = 0;
@@ -785,8 +785,9 @@ noce_try_store_flag_mask (if_info)
          || STORE_FLAG_VALUE == -1)
       && ((if_info->a == const0_rtx
           && rtx_equal_p (if_info->b, if_info->x))
-         || ((reversep = can_reverse_comparison_p (if_info->cond,
-                                                   if_info->jump))
+         || ((reversep = (reversed_comparison_code (if_info->cond,
+                                                    if_info->jump)
+                          != UNKNOWN))
              && if_info->b == const0_rtx
              && rtx_equal_p (if_info->a, if_info->x))))
     {
@@ -964,7 +965,7 @@ noce_try_cmove_arith (if_info)
   insn_b = if_info->insn_b;
 
   /* Possibly rearrange operands to make things come out more natural.  */
-  if (can_reverse_comparison_p (if_info->cond, if_info->jump))
+  if (reversed_comparison_code (if_info->cond, if_info->jump) != UNKNOWN)
     {
       int reversep = 0;
       if (rtx_equal_p (b, x))
@@ -974,7 +975,7 @@ noce_try_cmove_arith (if_info)
 
       if (reversep)
        {
-         code = reverse_condition (code);
+         code = reversed_comparison_code (if_info->cond, if_info->jump);
          tmp = a, a = b, b = tmp;
          tmp = insn_a, insn_a = insn_b, insn_b = tmp;
        }