Commit d2b21f20 by Uros Bizjak Committed by Uros Bizjak

alpha.c (alpha_emit_conditional_branch): Handle ORDERED and UNORDERED conditions.

	* config/alpha/alpha.c (alpha_emit_conditional_branch): Handle
	ORDERED and UNORDERED conditions.

From-SVN: r187411
parent 835c9db0
2012-05-12 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_emit_conditional_branch): Handle
ORDERED and UNORDERED conditions.
2012-05-11 Richard Guenther <rguenther@suse.de>
* tree-flow.h (referenced_var_check_and_insert): Remove.
......
......@@ -2335,7 +2335,7 @@ alpha_emit_conditional_branch (rtx operands[], enum machine_mode cmp_mode)
{
case EQ: case LE: case LT: case LEU: case LTU:
case UNORDERED:
/* We have these compares: */
/* We have these compares. */
cmp_code = code, branch_code = NE;
break;
......@@ -2572,13 +2572,15 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
case UNORDERED:
/* We have these compares. */
cmp_code = code, code = NE;
break;
case NE:
/* This must be reversed. */
cmp_code = EQ, code = EQ;
case ORDERED:
/* These must be reversed. */
cmp_code = reverse_condition (code), code = EQ;
break;
case GE: case GT: case GEU: case GTU:
......@@ -2598,6 +2600,14 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
gcc_unreachable ();
}
if (cmp_mode == DImode)
{
if (!reg_or_0_operand (op0, DImode))
op0 = force_reg (DImode, op0);
if (!reg_or_8bit_operand (op1, DImode))
op1 = force_reg (DImode, op1);
}
tem = gen_reg_rtx (cmp_mode);
emit_insn (gen_rtx_SET (VOIDmode, tem,
gen_rtx_fmt_ee (cmp_code, cmp_mode,
......@@ -2609,6 +2619,14 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
local_fast_math = 1;
}
if (cmp_mode == DImode)
{
if (!reg_or_0_operand (op0, DImode))
op0 = force_reg (DImode, op0);
if (!reg_or_8bit_operand (op1, DImode))
op1 = force_reg (DImode, op1);
}
/* We may be able to use a conditional move directly.
This avoids emitting spurious compares. */
if (signed_comparison_operator (cmp, VOIDmode)
......@@ -2627,11 +2645,13 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
switch (code)
{
case EQ: case LE: case LT: case LEU: case LTU:
case UNORDERED:
/* We have these compares: */
break;
case NE:
/* This must be reversed. */
case ORDERED:
/* These must be reversed. */
code = reverse_condition (code);
cmov_code = EQ;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment