From: rsandifo Date: Wed, 28 Sep 2011 15:00:10 +0000 (+0000) Subject: gcc/ X-Git-Tag: upstream/4.9.2~17459 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be7a395b8a69ca5b53f4a96bdec4eed6c17a1c68;p=platform%2Fupstream%2Flinaro-gcc.git gcc/ * config/arm/neon.md (neon_move_lo_quad_): Delete. (neon_move_hi_quad_): Likewise. (move_hi_quad_, move_lo_quad_): Use subreg moves. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179316 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad1d82b..98d926a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-09-28 Richard Sandiford + + * config/arm/neon.md (neon_move_lo_quad_): Delete. + (neon_move_hi_quad_): Likewise. + (move_hi_quad_, move_lo_quad_): Use subreg moves. + 2011-09-28 Nick Clifton * config/rx/predicates.md (rx_minmax_operand): New predicate. diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 5be3cf7..ea09da2 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -1251,66 +1251,14 @@ (const_string "neon_int_1") (const_string "neon_int_5")))] ) -; FIXME: We wouldn't need the following insns if we could write subregs of -; vector registers. Make an attempt at removing unnecessary moves, though -; we're really at the mercy of the register allocator. - -(define_insn "neon_move_lo_quad_" - [(set (match_operand:ANY128 0 "s_register_operand" "+w") - (vec_concat:ANY128 - (match_operand: 1 "s_register_operand" "w") - (vec_select: - (match_dup 0) - (match_operand:ANY128 2 "vect_par_constant_high" ""))))] - "TARGET_NEON" -{ - int dest = REGNO (operands[0]); - int src = REGNO (operands[1]); - - if (dest != src) - return "vmov\t%e0, %P1"; - else - return ""; -} - [(set_attr "neon_type" "neon_bp_simple")] -) - -(define_insn "neon_move_hi_quad_" - [(set (match_operand:ANY128 0 "s_register_operand" "+w") - (vec_concat:ANY128 - (vec_select: - (match_dup 0) - (match_operand:ANY128 2 "vect_par_constant_low" "")) - (match_operand: 1 "s_register_operand" "w")))] - - "TARGET_NEON" -{ - int dest = REGNO (operands[0]); - int src = REGNO (operands[1]); - - if (dest != src) - return "vmov\t%f0, %P1"; - else - return ""; -} - [(set_attr "neon_type" "neon_bp_simple")] -) - (define_expand "move_hi_quad_" [(match_operand:ANY128 0 "s_register_operand" "") (match_operand: 1 "s_register_operand" "")] "TARGET_NEON" { - rtvec v = rtvec_alloc (/2); - rtx t1; - int i; - - for (i=0; i < (/2); i++) - RTVEC_ELT (v, i) = GEN_INT (i); - - t1 = gen_rtx_PARALLEL (mode, v); - emit_insn (gen_neon_move_hi_quad_ (operands[0], operands[1], t1)); - + emit_move_insn (simplify_gen_subreg (mode, operands[0], mode, + GET_MODE_SIZE (mode)), + operands[1]); DONE; }) @@ -1319,16 +1267,9 @@ (match_operand: 1 "s_register_operand" "")] "TARGET_NEON" { - rtvec v = rtvec_alloc (/2); - rtx t1; - int i; - - for (i=0; i < (/2); i++) - RTVEC_ELT (v, i) = GEN_INT ((/2) + i); - - t1 = gen_rtx_PARALLEL (mode, v); - emit_insn (gen_neon_move_lo_quad_ (operands[0], operands[1], t1)); - + emit_move_insn (simplify_gen_subreg (mode, operands[0], + mode, 0), + operands[1]); DONE; })