Commit c8d3810f by Richard Henderson Committed by Richard Henderson

ia64.c (update_set_flags): Just return for IF_THEN_ELSE.

        * config/ia64/ia64.c (update_set_flags): Just return for IF_THEN_ELSE.
        Use SCALAR_FLOAT_MODE_P.
        * config/ia64/vect.md (vcondv2sf): Remove code check on comparison.
        (fselect): Rename from fpcmp; use %F.
        (fpcmp): New.

From-SVN: r100803
parent 30be951a
2005-06-09 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c (update_set_flags): Just return for IF_THEN_ELSE.
Use SCALAR_FLOAT_MODE_P.
* config/ia64/vect.md (vcondv2sf): Remove code check on comparison.
(fselect): Rename from fpcmp; use %F.
(fpcmp): New.
2005-06-09 Jan Hubicka <jh@suse.cz> 2005-06-09 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (cgraph_create_edges): Do not walk BLOCK; finalize * cgraphunit.c (cgraph_create_edges): Do not walk BLOCK; finalize
......
...@@ -5168,25 +5168,19 @@ update_set_flags (rtx x, struct reg_flags *pflags) ...@@ -5168,25 +5168,19 @@ update_set_flags (rtx x, struct reg_flags *pflags)
return; return;
case IF_THEN_ELSE: case IF_THEN_ELSE:
if (SET_DEST (x) == pc_rtx) /* There are three cases here:
/* X is a conditional branch. */ (1) The destination is (pc), in which case this is a branch,
return; nothing here applies.
else (2) The destination is ar.lc, in which case this is a
{ doloop_end_internal,
/* X is a conditional move. */ (3) The destination is an fp register, in which case this is
rtx cond = XEXP (src, 0); an fselect instruction.
cond = XEXP (cond, 0); In all cases, nothing we do in this function applies. */
return;
/* We always split conditional moves into COND_EXEC patterns, so the
only pattern that can reach here is doloop_end_internal. We don't
need to do anything special for this pattern. */
gcc_assert (GET_CODE (cond) == REG && REGNO (cond) == AR_LC_REGNUM);
return;
}
default: default:
if (COMPARISON_P (src) if (COMPARISON_P (src)
&& GET_MODE_CLASS (GET_MODE (XEXP (src, 0))) == MODE_FLOAT) && SCALAR_FLOAT_MODE_P (GET_MODE (XEXP (src, 0))))
/* Set pflags->is_fp to 1 so that we know we're dealing /* Set pflags->is_fp to 1 so that we know we're dealing
with a floating point comparison when processing the with a floating point comparison when processing the
destination of the SET. */ destination of the SET. */
......
;; IA-64 machine description for vector operations. ;; IA-64 machine description for vector operations.
;; Copyright (C) 2004 ;; Copyright (C) 2004, 2005
;; ;;
;; This file is part of GCC. ;; This file is part of GCC.
;; ;;
...@@ -873,30 +873,8 @@ ...@@ -873,30 +873,8 @@
{ {
rtx x, cmp; rtx x, cmp;
PUT_MODE (operands[3], V2SFmode);
switch (GET_CODE (operands[3]))
{
case EQ:
case NE:
case LT:
case LE:
case UNORDERED:
case ORDERED:
break;
case GT:
case GE:
x = XEXP (operands[3], 0);
XEXP (operands[3], 0) = XEXP (operands[3], 1);
XEXP (operands[3], 1) = x;
PUT_CODE (operands[3], swap_condition (GET_CODE (operands[3])));
break;
default:
gcc_unreachable ();
}
cmp = gen_reg_rtx (V2SFmode); cmp = gen_reg_rtx (V2SFmode);
PUT_MODE (operands[3], V2SFmode);
emit_insn (gen_rtx_SET (VOIDmode, cmp, operands[3])); emit_insn (gen_rtx_SET (VOIDmode, cmp, operands[3]));
x = gen_rtx_IF_THEN_ELSE (V2SFmode, cmp, operands[1], operands[2]); x = gen_rtx_IF_THEN_ELSE (V2SFmode, cmp, operands[1], operands[2]);
...@@ -906,12 +884,21 @@ ...@@ -906,12 +884,21 @@
(define_insn "*fpcmp" (define_insn "*fpcmp"
[(set (match_operand:V2SF 0 "fr_register_operand" "=f") [(set (match_operand:V2SF 0 "fr_register_operand" "=f")
(match_operator:V2SF 3 "comparison_operator"
[(match_operand:V2SF 1 "fr_reg_or_0_operand" "fU")
(match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")]))]
""
"fpcmp.%D3 %0 = %F1, %F2"
[(set_attr "itanium_class" "fmisc")])
(define_insn "*fselect"
[(set (match_operand:V2SF 0 "fr_register_operand" "=f")
(if_then_else:V2SF (if_then_else:V2SF
(match_operand:V2SF 1 "fr_register_operand" "f") (match_operand:V2SF 1 "fr_register_operand" "f")
(match_operand:V2SF 2 "fr_reg_or_0_operand" "fU") (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")
(match_operand:V2SF 3 "fr_reg_or_0_operand" "fU")))] (match_operand:V2SF 3 "fr_reg_or_0_operand" "fU")))]
"" ""
"fselect %0 = %2, %3, %1" "fselect %0 = %F2, %F3, %1"
[(set_attr "itanium_class" "fmisc")]) [(set_attr "itanium_class" "fmisc")])
(define_expand "vec_initv2sf" (define_expand "vec_initv2sf"
......
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