diff options
author | Michael Collison <michael.collison@linaro.org> | 2015-07-19 22:08:49 -0700 |
---|---|---|
committer | Michael Collison <michael.collison@linaro.org> | 2015-07-19 22:08:49 -0700 |
commit | 6867283baaa7db4972fe8a9c6b6f125862e53127 (patch) | |
tree | 6cca3c5184f1d51f8dc02f2b10cf4c229a95cddc | |
parent | 3c96ade2a810f084a134247d19964a82cf66f65d (diff) |
Add support vaddw on armlinaro-local/tcwg-833
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/neon.md | 38 |
2 files changed, 43 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 128e08afef2..627edf8a40f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-19 Michael Collison <michael.collison@linaro.org> + + * config/arm/neon.md: Added define_insn_and_split for + widen_ssumv8hi3 and widen_usumhi3 to improve vectorization + 2015-07-18 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * vmsdbgout.c (vmsdbgout_decl): Change name of prototyped diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 654d9d5c1aa..c05a75b78ed 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -1174,6 +1174,25 @@ ;; Widening operations +(define_insn_and_split "widen_ssumv8hi3" + [(set (match_operand:V4SI 0 "s_register_operand" "") + (plus:V4SI (sign_extend:V4SI + (match_operand:V8HI 1 "s_register_operand" "")) + (match_operand:V4SI 2 "s_register_operand" "")))] + "TARGET_NEON" + "#" + "&& reload_completed" + [(const_int 0)] + { + rtx loreg = simplify_gen_subreg (V4HImode, operands[1], V8HImode, 0); + rtx hireg = simplify_gen_subreg (V4HImode, operands[1], V8HImode, GET_MODE_SIZE (V4HImode)); + + emit_insn (gen_widen_ssumv4hi3 (operands[0], loreg, operands[2])); + emit_insn (gen_widen_ssumv4hi3 (operands[0], hireg, operands[2])); + DONE; + } + [(set_attr "type" "neon_add_widen")]) + (define_insn "widen_ssum<mode>3" [(set (match_operand:<V_widen> 0 "s_register_operand" "=w") (plus:<V_widen> (sign_extend:<V_widen> @@ -1184,6 +1203,25 @@ [(set_attr "type" "neon_add_widen")] ) +(define_insn_and_split "widen_usumv8hi3" + [(set (match_operand:V4SI 0 "s_register_operand" "") + (plus:V4SI (zero_extend:V4SI + (match_operand:V8HI 1 "s_register_operand" "")) + (match_operand:V4SI 2 "s_register_operand" "")))] + "TARGET_NEON" + "#" + "&& reload_completed" + [(const_int 0)] + { + rtx loreg = simplify_gen_subreg (V4HImode, operands[1], V8HImode, 0); + rtx hireg = simplify_gen_subreg (V4HImode, operands[1], V8HImode, GET_MODE_SIZE (V4HImode)); + + emit_insn (gen_widen_usumv4hi3 (operands[0], loreg, operands[2])); + emit_insn (gen_widen_usumv4hi3 (operands[0], hireg, operands[2])); + DONE; + } + [(set_attr "type" "neon_add_widen")]) + (define_insn "widen_usum<mode>3" [(set (match_operand:<V_widen> 0 "s_register_operand" "=w") (plus:<V_widen> (zero_extend:<V_widen> |