Commit 479ccabc by Andre Vieira

Arm: MVE: Add mve vec_duplicate pattern

This patch fixes an ICE we were seeing due to a missing vec_duplicate pattern.

gcc/ChangeLog:
2020-04-15  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/mve.md (mve_vec_duplicate<mode>): New pattern.
	(V_sz_elem2): Remove unused mode attribute.

gcc/testsuite/ChangeLog:
2020-04-15  Andre Vieira <andre.simoesdiasvieira@arm.com>
            Srinath Parvathaneni <srinath.parvathaneni@arm.com>

	* gcc.target/arm/mve/intrinsics/mve_vec_duplicate.c: New test.
parent d2f9e6ad
2020-04-15 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/mve.md (mve_vec_duplicate<mode>): New pattern.
(V_sz_elem2): Remove unused mode attribute.
2020-04-15 Matthew Malcomson <matthew.malcomson@arm.com> 2020-04-15 Matthew Malcomson <matthew.malcomson@arm.com>
* config/arm/arm.md (arm_movdi): Disallow for MVE. * config/arm/arm.md (arm_movdi): Disallow for MVE.
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
;; along with GCC; see the file COPYING3. If not see ;; along with GCC; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>. ;; <http://www.gnu.org/licenses/>.
(define_mode_attr V_sz_elem2 [(V16QI "s8") (V8HI "u16") (V4SI "u32")
(V2DI "u64")])
(define_mode_iterator MVE_types [V16QI V8HI V4SI V2DI TI V8HF V4SF V2DF]) (define_mode_iterator MVE_types [V16QI V8HI V4SI V2DI TI V8HF V4SF V2DF])
(define_mode_iterator MVE_VLD_ST [V16QI V8HI V4SI V8HF V4SF]) (define_mode_iterator MVE_VLD_ST [V16QI V8HI V4SI V8HF V4SF])
(define_mode_iterator MVE_0 [V8HF V4SF]) (define_mode_iterator MVE_0 [V8HF V4SF])
...@@ -11302,6 +11300,13 @@ ...@@ -11302,6 +11300,13 @@
[(set_attr "type" "mve_move") [(set_attr "type" "mve_move")
(set_attr "length" "8")]) (set_attr "length" "8")])
(define_insn "*mve_vec_duplicate<mode>"
[(set (match_operand:MVE_VLD_ST 0 "s_register_operand" "=w")
(vec_duplicate:MVE_VLD_ST (match_operand:<V_elem> 1 "general_operand" "r")))]
"TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
"vdup.<V_sz_elem>\t%q0, %1"
[(set_attr "type" "mve_move")])
;; CDE instructions on MVE registers. ;; CDE instructions on MVE registers.
(define_insn "arm_vcx1qv16qi" (define_insn "arm_vcx1qv16qi"
......
2020-04-15 Andre Vieira <andre.simoesdiasvieira@arm.com>
Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* gcc.target/arm/mve/intrinsics/mve_vec_duplicate.c: New test.
2020-04-15 Jakub Jelinek <jakub@redhat.com> 2020-04-15 Jakub Jelinek <jakub@redhat.com>
PR c/94593 PR c/94593
......
/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */
/* { dg-add-options arm_v8_1m_mve_fp } */
/* { dg-additional-options "-O2" } */
#include "arm_mve.h"
float32x4_t a;
void foo (void)
{
a = 1.41176471f - 0.47058824f * a;
}
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