From 093ac0a5f114589ef26472c88b9f56ce3f2792ad Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Mon, 8 Apr 2013 16:03:05 +0000 Subject: [PATCH] epiphany.md (v2si3): Use gen_addsi3_i / gen_subsi3_i. * config/epiphany/epiphany.md (v2si3): Use gen_addsi3_i / gen_subsi3_i. From-SVN: r197592 --- gcc/ChangeLog | 3 +++ gcc/config/epiphany/epiphany.md | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6abaf4008b..ec7aa1a817e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -30,6 +30,9 @@ comparison to a non-zero operand. Use (clobber (scratch)) for first insn if the gpr output is not needed. + * config/epiphany/epiphany.md (v2si3): + Use gen_addsi3_i / gen_subsi3_i. + 2013-04-08 Jakub Jelinek PR c++/34949 diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md index 4bb8da39511..7b63ef25da6 100644 --- a/gcc/config/epiphany/epiphany.md +++ b/gcc/config/epiphany/epiphany.md @@ -2429,6 +2429,11 @@ [(plus "add") (minus "sub") (mult "mul") (div "div") (and "and") (ior "ior") (xor "xor")]) +; The addsi3 / subsi3 do checks that we don't want when splitting V2SImode +; operations into two SImode operations. +(define_code_attr si_pattern_suffix + [(plus "_i") (minus "_i") (and "") (ior "") (xor "")]) + ; You might think that this would work better as a define_expand, but ; again lower_subreg pessimizes the code if it sees indiviudual operations. ; We need to keep inputs and outputs as register pairs if we want to @@ -2455,8 +2460,8 @@ o1h = copy_to_mode_reg (SImode, o1h); if (reg_overlap_mentioned_p (o0l, o2h)) o2h = copy_to_mode_reg (SImode, o2h); - emit_insn (gen_si3 (o0l, o1l, o2l)); - emit_insn (gen_si3 (o0h, o1h, o2h)); + emit_insn (gen_si3 (o0l, o1l, o2l)); + emit_insn (gen_si3 (o0h, o1h, o2h)); DONE; } [(set_attr "length" "8")]) -- 2.30.2