Commit 1ea9fe56 by Mark Mitchell Committed by Mark Mitchell

neon.md (*mul<mode>3add<mode>_neon): New pattern.

	* config/arm/neon.md (*mul<mode>3add<mode>_neon): New pattern.
	(*mul<mode>3neg<mode>add<mode>_neon): Likewise.

	* gcc.dg/target/arm/neon-vmla-1.c: New.
	* gcc.dg/target/arm/neon-vmls-1.c: Likewise.

From-SVN: r147771
parent 449223af
2009-05-21 Mark Mitchell <mark@codesourcery.com>
* config/arm/neon.md (*mul<mode>3add<mode>_neon): New pattern.
(*mul<mode>3neg<mode>add<mode>_neon): Likewise.
2009-05-21 Shujing Zhao <pearly.zhao@oracle.com> 2009-05-21 Shujing Zhao <pearly.zhao@oracle.com>
* config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and * config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and
......
...@@ -862,6 +862,50 @@ ...@@ -862,6 +862,50 @@
(const_string "neon_mul_qqq_8_16_32_ddd_32")))))] (const_string "neon_mul_qqq_8_16_32_ddd_32")))))]
) )
(define_insn "*mul<mode>3add<mode>_neon"
[(set (match_operand:VDQ 0 "s_register_operand" "=w")
(plus:VDQ (mult:VDQ (match_operand:VDQ 2 "s_register_operand" "w")
(match_operand:VDQ 3 "s_register_operand" "w"))
(match_operand:VDQ 1 "s_register_operand" "0")))]
"TARGET_NEON"
"vmla.<V_if_elem>\t%<V_reg>0, %<V_reg>2, %<V_reg>3"
[(set (attr "neon_type")
(if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0))
(if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
(const_string "neon_fp_vmla_ddd")
(const_string "neon_fp_vmla_qqq"))
(if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
(if_then_else
(ne (symbol_ref "<Scalar_mul_8_16>") (const_int 0))
(const_string "neon_mla_ddd_8_16_qdd_16_8_long_32_16_long")
(const_string "neon_mla_ddd_32_qqd_16_ddd_32_scalar_qdd_64_32_long_scalar_qdd_64_32_long"))
(if_then_else (ne (symbol_ref "<Scalar_mul_8_16>") (const_int 0))
(const_string "neon_mla_qqq_8_16")
(const_string "neon_mla_qqq_32_qqd_32_scalar")))))]
)
(define_insn "*mul<mode>3neg<mode>add<mode>_neon"
[(set (match_operand:VDQ 0 "s_register_operand" "=w")
(minus:VDQ (match_operand:VDQ 1 "s_register_operand" "0")
(mult:VDQ (match_operand:VDQ 2 "s_register_operand" "w")
(match_operand:VDQ 3 "s_register_operand" "w"))))]
"TARGET_NEON"
"vmls.<V_if_elem>\t%<V_reg>0, %<V_reg>2, %<V_reg>3"
[(set (attr "neon_type")
(if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0))
(if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
(const_string "neon_fp_vmla_ddd")
(const_string "neon_fp_vmla_qqq"))
(if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
(if_then_else
(ne (symbol_ref "<Scalar_mul_8_16>") (const_int 0))
(const_string "neon_mla_ddd_8_16_qdd_16_8_long_32_16_long")
(const_string "neon_mla_ddd_32_qqd_16_ddd_32_scalar_qdd_64_32_long_scalar_qdd_64_32_long"))
(if_then_else (ne (symbol_ref "<Scalar_mul_8_16>") (const_int 0))
(const_string "neon_mla_qqq_8_16")
(const_string "neon_mla_qqq_32_qqd_32_scalar")))))]
)
(define_insn "ior<mode>3" (define_insn "ior<mode>3"
[(set (match_operand:VDQ 0 "s_register_operand" "=w,w") [(set (match_operand:VDQ 0 "s_register_operand" "=w,w")
(ior:VDQ (match_operand:VDQ 1 "s_register_operand" "w,0") (ior:VDQ (match_operand:VDQ 1 "s_register_operand" "w,0")
......
2009-05-21 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/target/arm/neon-vmla-1.c: New.
* gcc.dg/target/arm/neon-vmls-1.c: Likewise.
2009-05-20 Adam Nemet <anemet@caviumnetworks.com> 2009-05-20 Adam Nemet <anemet@caviumnetworks.com>
* gcc.target/mips/octeon-exts-6.c: New test. * gcc.target/mips/octeon-exts-6.c: New test.
......
/* { dg-require-effective-target arm_neon_hw } */
/* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize" } */
/* { dg-final { scan-assembler "vmla\\.f32" } } */
/* Verify that VMLA is used. */
void f1(int n, float a, float x[], float y[]) {
int i;
for (i = 0; i < n; ++i)
y[i] = a * x[i] + y[i];
}
/* { dg-require-effective-target arm_neon_hw } */
/* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize" } */
/* { dg-final { scan-assembler "vmls\\.f32" } } */
/* Verify that VMLS is used. */
void f1(int n, float a, float x[], float y[]) {
int i;
for (i = 0; i < n; ++i)
y[i] = y[i] - a * x[i];
}
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