2015-05-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+ * combine.c, expmed.c, expr.c, optabs.c optabs.h, toplev.c: DOn't
+ check HAVE_conditional_move with the preprocessor.
+
+2015-05-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
* genconfig.c (main): Always define HAVE_conditional_move.
* combine.c, expmed.c, expr.c, ifcvt.c, optabs.c, optabs.h,
toplev.c, tree-ssa-phiopt.c: Don't check if HAVE_conditional_move
&& (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))
-#if HAVE_conditional_move
- && ! can_conditionally_move_p (GET_MODE (src))
-#endif
+ && (!HAVE_conditional_move
+ || ! can_conditionally_move_p (GET_MODE (src)))
&& (num_sign_bit_copies (XEXP (XEXP (src, 0), 0),
GET_MODE (XEXP (XEXP (src, 0), 0)))
== GET_MODE_PRECISION (GET_MODE (XEXP (XEXP (src, 0), 0))))
return expand_shift (RSHIFT_EXPR, mode, temp, logd, NULL_RTX, 0);
}
-#if HAVE_conditional_move
- if (BRANCH_COST (optimize_insn_for_speed_p (), false)
- >= 2)
+ if (HAVE_conditional_move
+ && BRANCH_COST (optimize_insn_for_speed_p (), false) >= 2)
{
rtx temp2;
}
end_sequence ();
}
-#endif
if (BRANCH_COST (optimize_insn_for_speed_p (),
false) >= 2)
target_mode);
}
-#if HAVE_conditional_move
+ if (!HAVE_conditional_move)
+ return 0;
+
/* 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,
if (tem == 0)
delete_insns_since (last);
return tem;
-#else
- return 0;
-#endif
}
/* The remaining tricks only apply to integer comparisons. */
return def_stmt;
}
-#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. */
return def_stmt;
}
-#endif
\f
/* Determine whether the LEN bytes generated by CONSTFUN can be
return MAX (factor, talign);
}
\f
-#if HAVE_conditional_move
/* Convert the tree comparison code TCODE to the rtl one where the
signedness is UNSIGNEDP. */
}
return code;
}
-#endif
/* Subroutine of expand_expr. Expand the two operands of a binary
expression EXP0 and EXP1 placing the results in OP0 and OP1.
tree treeop1 ATTRIBUTE_UNUSED,
tree treeop2 ATTRIBUTE_UNUSED)
{
-#if HAVE_conditional_move
rtx insn;
rtx op00, op01, op1, op2;
enum rtx_code comparison_code;
/* Otherwise discard the sequence and fall back to code with
branches. */
end_sequence ();
-#endif
return NULL_RTX;
}
if (code == MIN_EXPR)
comparison_code = LT;
}
-#if HAVE_conditional_move
+
/* Use a conditional move if possible. */
if (can_conditionally_move_p (mode))
{
branches. */
end_sequence ();
}
-#endif
+
if (target != op0)
emit_move_insn (target, op0);
}
-#if HAVE_conditional_move
/* Try implementing expand_doubleword_shift using conditional moves.
The shift is by < BITS_PER_WORD if (CMP_CODE CMP1 CMP2) is true,
otherwise it is by >= BITS_PER_WORD. SUBWORD_OP1 and SUPERWORD_OP1
return true;
}
-#endif
/* Expand a doubleword shift (ashl, ashr or lshr) using word-mode shifts.
OUTOF_INPUT and INTO_INPUT are the two word-sized halves of the first
unsignedp, methods, shift_mask);
}
-#if HAVE_conditional_move
/* Try using conditional moves to generate straight-line code. */
- {
- rtx_insn *start = get_last_insn ();
- if (expand_doubleword_shift_condmove (op1_mode, binoptab,
- cmp_code, cmp1, cmp2,
- outof_input, into_input,
- op1, superword_op1,
- outof_target, into_target,
- unsignedp, methods, shift_mask))
- return true;
- delete_insns_since (start);
- }
-#endif
+ if (HAVE_conditional_move)
+ {
+ rtx_insn *start = get_last_insn ();
+ if (expand_doubleword_shift_condmove (op1_mode, binoptab,
+ cmp_code, cmp1, cmp2,
+ outof_input, into_input,
+ op1, superword_op1,
+ outof_target, into_target,
+ unsignedp, methods, shift_mask))
+ return true;
+ delete_insns_since (start);
+ }
/* As a last resort, use branches to select the correct alternative. */
rtx_code_label *subword_label = gen_label_rtx ();
#endif
}
\f
-#if HAVE_conditional_move
/* Emit a conditional move instruction if the machine supports one for that
condition and machine mode.
return 0;
}
-#endif /* HAVE_conditional_move */
-
/* Emit a conditional addition instruction if the machine supports one for that
condition and machine mode.
#error "insn-config.h must be included before optabs.h"
#endif
-#if HAVE_conditional_move
/* Emit a conditional move operation. */
rtx emit_conditional_move (rtx, enum rtx_code, rtx, rtx, machine_mode,
rtx, rtx, machine_mode, int);
/* Return nonzero if the conditional move is supported. */
int can_conditionally_move_p (machine_mode mode);
-#endif
rtx emit_conditional_add (rtx, enum rtx_code, rtx, rtx, machine_mode,
rtx, rtx, machine_mode, int);
warning (0, "var-tracking-assignments changes selective scheduling");
if (flag_tree_cselim == AUTODETECT_VALUE)
-#if HAVE_conditional_move
- flag_tree_cselim = 1;
-#else
- flag_tree_cselim = 0;
-#endif
+ {
+ if (HAVE_conditional_move)
+ flag_tree_cselim = 1;
+ else
+ flag_tree_cselim = 0;
+ }
/* If auxiliary info generation is desired, open the output file.
This goes in the same directory as the source file--unlike