[AArch64] Support scalar FABD

gcc/ChangeLog

2013-05-02  Vidya Praveen  <vidyapraveen@arm.com>

        * config/aarch64/aarch64-simd.md (*fabd_scalar<mode>3): Support
          scalar form of FABD instruction.

gcc/testsuite/ChangeLog

2013-05-02  Vidya Praveen <vidyapraveen@arm.com>

        * gcc.target/aarch64/fabd.c: New file.

From-SVN: r198574
This commit is contained in:
Vidya Praveen 2013-05-03 11:17:57 +01:00 committed by Marcus Shawcroft
parent eacb22bf73
commit 1d0c8e5cc3
4 changed files with 58 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-05-03 Vidya Praveen <vidyapraveen@arm.com>
* config/aarch64/aarch64-simd.md (*fabd_scalar<mode>3): Support
scalar form of FABD instruction.
2013-05-02 Vladimir Makarov <vmakarov@redhat.com>
* lra-constraints.c (process_alt_operands): Add checking alt

View File

@ -556,6 +556,17 @@
(set_attr "simd_mode" "<MODE>")]
)
(define_insn "*fabd_scalar<mode>3"
[(set (match_operand:GPF 0 "register_operand" "=w")
(abs:GPF (minus:GPF
(match_operand:GPF 1 "register_operand" "w")
(match_operand:GPF 2 "register_operand" "w"))))]
"TARGET_SIMD"
"fabd\t%<s>0, %<s>1, %<s>2"
[(set_attr "simd_type" "simd_fabd")
(set_attr "mode" "<MODE>")]
)
(define_insn "and<mode>3"
[(set (match_operand:VDQ 0 "register_operand" "=w")
(and:VDQ (match_operand:VDQ 1 "register_operand" "w")

View File

@ -1,3 +1,7 @@
2013-05-03 Vidya Praveen <vidyapraveen@arm.com>
* gcc.target/aarch64/fabd.c: New file.
2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54318

View File

@ -0,0 +1,38 @@
/* { dg-do run } */
/* { dg-options "-O1 -fno-inline --save-temps" } */
extern double fabs (double);
extern float fabsf (float);
extern void abort ();
extern void exit (int);
void
fabd_d (double x, double y, double d)
{
if ((fabs (x - y) - d) > 0.00001)
abort ();
}
/* { dg-final { scan-assembler "fabd\td\[0-9\]+" } } */
void
fabd_f (float x, float y, float d)
{
if ((fabsf (x - y) - d) > 0.00001)
abort ();
}
/* { dg-final { scan-assembler "fabd\ts\[0-9\]+" } } */
int
main ()
{
fabd_d (10.0, 5.0, 5.0);
fabd_d (5.0, 10.0, 5.0);
fabd_f (10.0, 5.0, 5.0);
fabd_f (5.0, 10.0, 5.0);
return 0;
}
/* { dg-final { cleanup-saved-temps } } */