Re: [PATCH 5/7] always define HAVE_conditional_move

2015-05-21 Thread Jeff Law

On 05/20/2015 08:09 PM, tbsaunde+...@tbsaunde.org wrote:

From: Trevor Saunders tbsaunde+...@tbsaunde.org

gcc/ChangeLog:

2015-05-20  Trevor Saunders  tbsaunde+...@tbsaunde.org

* genconfig.c (main): Always define HAVE_conditional_move.
* *.c: Don't check if HAVE_conditional_move is defined.
Again, you're hitting just a handful of files, if you could go ahead and 
list them it'd be appreciated.


OK for the trunk.
jeff



[PATCH 5/7] always define HAVE_conditional_move

2015-05-20 Thread tbsaunde+gcc
From: Trevor Saunders tbsaunde+...@tbsaunde.org

gcc/ChangeLog:

2015-05-20  Trevor Saunders  tbsaunde+...@tbsaunde.org

* genconfig.c (main): Always define HAVE_conditional_move.
* *.c: Don't check if HAVE_conditional_move is defined.
---
 gcc/ChangeLog |  4 
 gcc/combine.c |  2 +-
 gcc/expmed.c  |  4 ++--
 gcc/expr.c|  8 
 gcc/genconfig.c   |  2 ++
 gcc/ifcvt.c   | 11 ---
 gcc/optabs.c  |  6 +++---
 gcc/optabs.h  |  2 +-
 gcc/toplev.c  |  2 +-
 gcc/tree-ssa-phiopt.c |  4 
 10 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 21ff1b8..d115f6e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2015-05-20  Trevor Saunders  tbsaunde+...@tbsaunde.org
 
+   * genconfig.c (main): Always define HAVE_conditional_move.
+
+2015-05-20  Trevor Saunders  tbsaunde+...@tbsaunde.org
+
* *.c: Remove comparison of ARG_FRAME_POINTER_REGNUM and
FRAME_POINTER_REGNUM with the preprocessor.
 
diff --git a/gcc/combine.c b/gcc/combine.c
index 812b917..45177c8 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -6816,7 +6816,7 @@ simplify_set (rtx x)
(GET_CODE (XEXP (src, 0)) == EQ || GET_CODE (XEXP (src, 0)) == NE)
XEXP (XEXP (src, 0), 1) == const0_rtx
GET_MODE (src) == GET_MODE (XEXP (XEXP (src, 0), 0))
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
! can_conditionally_move_p (GET_MODE (src))
 #endif
(num_sign_bit_copies (XEXP (XEXP (src, 0), 0),
diff --git a/gcc/expmed.c b/gcc/expmed.c
index c95299c..589a7a3 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3797,7 +3797,7 @@ expand_sdiv_pow2 (machine_mode mode, rtx op0, 
HOST_WIDE_INT d)
   return expand_shift (RSHIFT_EXPR, mode, temp, logd, NULL_RTX, 0);
 }
 
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
   if (BRANCH_COST (optimize_insn_for_speed_p (), false)
   = 2)
 {
@@ -,7 +,7 @@ emit_store_flag (rtx target, enum rtx_code code, rtx op0, 
rtx op1,
target_mode);
}
 
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
   /* Try using a setcc instruction for ORDERED/UNORDERED, followed by a
 conditional move.  */
   tem = emit_store_flag_1 (subtarget, first_code, op0, op1, mode, 0,
diff --git a/gcc/expr.c b/gcc/expr.c
index 275c636..efbf9fb 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2423,7 +2423,7 @@ get_def_for_expr (tree name, enum tree_code code)
   return def_stmt;
 }
 
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
 /* Return the defining gimple statement for SSA_NAME NAME if it is an
assigment and the class of the expresion on the RHS is CLASS.  Return
NULL otherwise.  */
@@ -7517,7 +7517,7 @@ highest_pow2_factor_for_target (const_tree target, 
const_tree exp)
   return MAX (factor, talign);
 }
 
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
 /* Convert the tree comparison code TCODE to the rtl one where the
signedness is UNSIGNEDP.  */
 
@@ -8021,7 +8021,7 @@ expand_cond_expr_using_cmove (tree treeop0 
ATTRIBUTE_UNUSED,
  tree treeop1 ATTRIBUTE_UNUSED,
  tree treeop2 ATTRIBUTE_UNUSED)
 {
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
   rtx insn;
   rtx op00, op01, op1, op2;
   enum rtx_code comparison_code;
@@ -8892,7 +8892,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode 
tmode,
if (code == MIN_EXPR)
  comparison_code = LT;
  }
-#ifdef HAVE_conditional_move
+#if HAVE_conditional_move
/* Use a conditional move if possible.  */
if (can_conditionally_move_p (mode))
  {
diff --git a/gcc/genconfig.c b/gcc/genconfig.c
index 2247eef..a3e5b31 100644
--- a/gcc/genconfig.c
+++ b/gcc/genconfig.c
@@ -352,6 +352,8 @@ main (int argc, char **argv)
 
   if (have_cmove_flag)
 printf (#define HAVE_conditional_move 1\n);
+  else
+printf (#define HAVE_conditional_move 0\n);
 
   if (have_cond_exec_flag)
 printf (#define HAVE_conditional_execution 1\n);
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index b00aaa4..37117b7 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -72,9 +72,6 @@
 #include shrink-wrap.h
 #include ifcvt.h
 
-#ifndef HAVE_conditional_move
-#define HAVE_conditional_move 0
-#endif
 #ifndef HAVE_incscc
 #define HAVE_incscc 0
 #endif
@@ -1505,7 +1502,6 @@ noce_emit_cmove (struct noce_if_info *if_info, rtx x, 
enum rtx_code code,
return NULL_RTX;
 }
 
-#if HAVE_conditional_move
   unsignedp = (code == LTU || code == GEU
   || code == LEU || code == GTU);
 
@@ -1562,13 +1558,6 @@ noce_emit_cmove (struct noce_if_info *if_info, rtx x, 
enum rtx_code code,
 }
   else
 return NULL_RTX;
-#else
-  /* We'll never get here, as noce_process_if_block doesn't call the
- functions involved.  Ifdef code, however, should be discouraged
- because it