#include "langhooks.h"
static bool prefer_and_bit_test (machine_mode, int);
-static void do_jump_by_parts_greater (tree, tree, int,
+static void do_jump_by_parts_greater (scalar_int_mode, tree, tree, int,
rtx_code_label *, rtx_code_label *,
profile_probability);
-static void do_jump_by_parts_equality (tree, tree, rtx_code_label *,
- rtx_code_label *, profile_probability);
+static void do_jump_by_parts_equality (scalar_int_mode, tree, tree,
+ rtx_code_label *, rtx_code_label *,
+ profile_probability);
static void do_compare_and_jump (tree, tree, enum rtx_code, enum rtx_code,
rtx_code_label *, rtx_code_label *,
profile_probability);
prob.invert ());
else if (is_int_mode (TYPE_MODE (inner_type), &int_mode)
&& !can_compare_p (EQ, int_mode, ccp_jump))
- do_jump_by_parts_equality (op0, op1, if_false_label, if_true_label,
- prob);
+ do_jump_by_parts_equality (int_mode, op0, op1, if_false_label,
+ if_true_label, prob);
else
do_compare_and_jump (op0, op1, EQ, EQ, if_false_label, if_true_label,
prob);
do_jump (op0, if_false_label, if_true_label, prob);
else if (is_int_mode (TYPE_MODE (inner_type), &int_mode)
&& !can_compare_p (NE, int_mode, ccp_jump))
- do_jump_by_parts_equality (op0, op1, if_true_label, if_false_label,
- prob.invert ());
+ do_jump_by_parts_equality (int_mode, op0, op1, if_true_label,
+ if_false_label, prob.invert ());
else
do_compare_and_jump (op0, op1, NE, NE, if_false_label, if_true_label,
prob);
mode = TYPE_MODE (TREE_TYPE (op0));
if (is_int_mode (mode, &int_mode)
&& ! can_compare_p (LT, int_mode, ccp_jump))
- do_jump_by_parts_greater (op0, op1, 1, if_false_label,
+ do_jump_by_parts_greater (int_mode, op0, op1, 1, if_false_label,
if_true_label, prob);
else
do_compare_and_jump (op0, op1, LT, LTU, if_false_label, if_true_label,
mode = TYPE_MODE (TREE_TYPE (op0));
if (is_int_mode (mode, &int_mode)
&& ! can_compare_p (LE, int_mode, ccp_jump))
- do_jump_by_parts_greater (op0, op1, 0, if_true_label, if_false_label,
- prob.invert ());
+ do_jump_by_parts_greater (int_mode, op0, op1, 0, if_true_label,
+ if_false_label, prob.invert ());
else
do_compare_and_jump (op0, op1, LE, LEU, if_false_label, if_true_label,
prob);
mode = TYPE_MODE (TREE_TYPE (op0));
if (is_int_mode (mode, &int_mode)
&& ! can_compare_p (GT, int_mode, ccp_jump))
- do_jump_by_parts_greater (op0, op1, 0, if_false_label,
+ do_jump_by_parts_greater (int_mode, op0, op1, 0, if_false_label,
if_true_label, prob);
else
do_compare_and_jump (op0, op1, GT, GTU, if_false_label, if_true_label,
mode = TYPE_MODE (TREE_TYPE (op0));
if (is_int_mode (mode, &int_mode)
&& ! can_compare_p (GE, int_mode, ccp_jump))
- do_jump_by_parts_greater (op0, op1, 1, if_true_label, if_false_label,
- prob.invert ());
+ do_jump_by_parts_greater (int_mode, op0, op1, 1, if_true_label,
+ if_false_label, prob.invert ());
else
do_compare_and_jump (op0, op1, GE, GEU, if_false_label, if_true_label,
prob);
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
static void
-do_jump_by_parts_greater_rtx (machine_mode mode, int unsignedp, rtx op0,
+do_jump_by_parts_greater_rtx (scalar_int_mode mode, int unsignedp, rtx op0,
rtx op1, rtx_code_label *if_false_label,
rtx_code_label *if_true_label,
profile_probability prob)
/* Given a comparison expression EXP for values too wide to be compared
with one insn, test the comparison and jump to the appropriate label.
The code of EXP is ignored; we always test GT if SWAP is 0,
- and LT if SWAP is 1. */
+ and LT if SWAP is 1. MODE is the mode of the two operands. */
static void
-do_jump_by_parts_greater (tree treeop0, tree treeop1, int swap,
- rtx_code_label *if_false_label,
+do_jump_by_parts_greater (scalar_int_mode mode, tree treeop0, tree treeop1,
+ int swap, rtx_code_label *if_false_label,
rtx_code_label *if_true_label,
profile_probability prob)
{
rtx op0 = expand_normal (swap ? treeop1 : treeop0);
rtx op1 = expand_normal (swap ? treeop0 : treeop1);
- machine_mode mode = TYPE_MODE (TREE_TYPE (treeop0));
int unsignedp = TYPE_UNSIGNED (TREE_TYPE (treeop0));
do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label,
to indicate drop through. */
static void
-do_jump_by_parts_zero_rtx (machine_mode mode, rtx op0,
+do_jump_by_parts_zero_rtx (scalar_int_mode mode, rtx op0,
rtx_code_label *if_false_label,
rtx_code_label *if_true_label,
profile_probability prob)
to indicate drop through. */
static void
-do_jump_by_parts_equality_rtx (machine_mode mode, rtx op0, rtx op1,
+do_jump_by_parts_equality_rtx (scalar_int_mode mode, rtx op0, rtx op1,
rtx_code_label *if_false_label,
rtx_code_label *if_true_label,
profile_probability prob)
}
/* Given an EQ_EXPR expression EXP for values too wide to be compared
- with one insn, test the comparison and jump to the appropriate label. */
+ with one insn, test the comparison and jump to the appropriate label.
+ MODE is the mode of the two operands. */
static void
-do_jump_by_parts_equality (tree treeop0, tree treeop1,
+do_jump_by_parts_equality (scalar_int_mode mode, tree treeop0, tree treeop1,
rtx_code_label *if_false_label,
rtx_code_label *if_true_label,
profile_probability prob)
{
rtx op0 = expand_normal (treeop0);
rtx op1 = expand_normal (treeop1);
- machine_mode mode = TYPE_MODE (TREE_TYPE (treeop0));
do_jump_by_parts_equality_rtx (mode, op0, op1, if_false_label,
if_true_label, prob);
}