simd-builtins-1.f90: Update for aarch64*-*-*.
authorSteve Ellcey <sellcey@marvell.com>
Wed, 27 Feb 2019 00:02:53 +0000 (00:02 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Wed, 27 Feb 2019 00:02:53 +0000 (00:02 +0000)
2018-02-26  Steve Ellcey  <sellcey@marvell.com>

* gfortran.dg/simd-builtins-1.f90: Update for aarch64*-*-*.
* gfortran.dg/simd-builtins-2.f90: Ditto.
* gfortran.dg/simd-builtins-6.f90: Ditto.
* gfortran.dg/simd-builtins-8.f90: New test.
* gfortran.dg/simd-builtins-8.h: New header file.

From-SVN: r269236

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/simd-builtins-1.f90
gcc/testsuite/gfortran.dg/simd-builtins-2.f90
gcc/testsuite/gfortran.dg/simd-builtins-6.f90
gcc/testsuite/gfortran.dg/simd-builtins-8.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-8.h [new file with mode: 0644]

index 14a8f541e814117c0d822ef086ce5dca6bcfeeef..807c04567f5136893e2c28e4dadd9b1a6f8e939c 100644 (file)
@@ -1,3 +1,11 @@
+2018-02-26  Steve Ellcey  <sellcey@marvell.com>
+
+       * gfortran.dg/simd-builtins-1.f90: Update for aarch64*-*-*.
+       * gfortran.dg/simd-builtins-2.f90: Ditto.
+       * gfortran.dg/simd-builtins-6.f90: Ditto.
+       * gfortran.dg/simd-builtins-8.f90: New test.
+       * gfortran.dg/simd-builtins-8.h: New header file.
+
 2019-02-26  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/89507
index 6d79ef8dc4639b700a005cdd07f222f1146448e7..5cb3eb5132a866b9df4966eae9fa44ed5ed20686 100644 (file)
@@ -1,5 +1,6 @@
-! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
-! { dg-additional-options "-msse2 -mno-avx -nostdinc -Ofast -fpre-include=simd-builtins-1.h -fdump-tree-optimized" }
+! { dg-do compile { target i?86-*-linux* x86_64-*-linux* aarch64*-*-linux* } }
+! { dg-additional-options "-nostdinc -Ofast -fpre-include=simd-builtins-1.h -fdump-tree-optimized" }
+! { dg-additional-options "-msse2 -mno-avx" { target i?86-*-linux* x86_64-*-linux* } }
 
 program test_overloaded_intrinsic
   real(4) :: x4(3200), y4(3200)
@@ -14,6 +15,7 @@ program test_overloaded_intrinsic
   print *, y8
 end
 
-! { dg-final { scan-tree-dump "sinf.simdclone" "optimized" } } */
-! { dg-final { scan-tree-dump "__builtin_sin" "optimized" } } */
-! { dg-final { scan-assembler "call.*_ZGVbN4v_sinf" } }
+! { dg-final { scan-tree-dump "sinf.simdclone" "optimized" } }
+! { dg-final { scan-tree-dump "__builtin_sin" "optimized" } }
+! { dg-final { scan-assembler "call.*_ZGVbN4v_sinf" { target i?86-*-linux* x86_64-*-* } } }
+! { dg-final { scan-assembler "bl.*_ZGVnN4v_sinf" { target aarch64*-*-* } } }
index f0e6bc138628cb587ee92f62214e48667db3538c..2e5bc22716be4e748cc54b6ac64f5a3435c0a783 100644 (file)
@@ -1,11 +1,12 @@
-! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
-! { dg-additional-options "-msse2 -nostdinc -Ofast -fdump-tree-optimized" }
+! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* aarch64*-*-linux* } } }
+! { dg-additional-options "-nostdinc -Ofast -fdump-tree-optimized" }
+! { dg-additional-options "-msse2" { target i?86-*-linux* x86_64-*-linux* } }
 
 program test_overloaded_intrinsic
   real(4) :: x4(3200), y4(3200)
   real(8) :: x8(3200), y8(3200)
 
-  ! this should be using simd clone
+  ! this should not be using simd clone
   y4 = sin(x4)
   print *, y4
 
@@ -18,3 +19,4 @@ end
 ! { dg-final { scan-tree-dump "__builtin_sin" "optimized" } } */
 ! { dg-final { scan-tree-dump-not "simdclone" "optimized" } } */
 ! { dg-final { scan-assembler-not "call.*_ZGVbN4v_sinf" } }
+! { dg-final { scan-assembler-not "bl.*_ZGVnN4v_sinf" } }
index 2ffa807e6b68a5537245a10c2683621e5864a3d3..60bcac78f3e0cc492930f3eb73cf97065312dc1c 100644 (file)
@@ -1,5 +1,6 @@
-! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
-! { dg-additional-options "-msse2 -mno-avx -nostdinc -Ofast -fdump-tree-optimized" }
+! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* aarch64*-*-linux* } } }
+! { dg-additional-options "-nostdinc -Ofast -fdump-tree-optimized" }
+! { dg-additional-options "-msse2 -mno-avx" { target i?86-*-linux* x86_64-*-linux* } }
 
 !GCC$ builtin (sin) attributes simd (inbranch)
 !GCC$ builtin (sinf) attributes simd (notinbranch)
@@ -21,4 +22,5 @@ end
 
 ! { dg-final { scan-tree-dump "sinf.simdclone" "optimized" } } */
 ! { dg-final { scan-tree-dump "__builtin_sin" "optimized" } } */
-! { dg-final { scan-assembler "call.*_ZGVbN4v_sinf" } }
+! { dg-final { scan-assembler "call.*_ZGVbN4v_sinf" { target i?86-*-linux* x86_64-*-* } } }
+! { dg-final { scan-assembler "bl.*_ZGVnN4v_sinf" { target aarch64*-*-* } } }
diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-8.f90 b/gcc/testsuite/gfortran.dg/simd-builtins-8.f90
new file mode 100644 (file)
index 0000000..0237235
--- /dev/null
@@ -0,0 +1,19 @@
+! { dg-do compile { target { aarch64*-*-linux* } } }
+! { dg-additional-options "-nostdinc -Ofast -fpre-include=simd-builtins-8.h -fdump-tree-optimized" }
+
+program test_overloaded_intrinsic
+  real(4) :: x4(3200), y4(3200)
+  real(8) :: x8(3200), y8(3200)
+
+  y4 = sin(x4)
+  print *, y4
+
+  y4 = sin(x8)
+  print *, y8
+end
+
+! { dg-final { scan-tree-dump "sinf.simdclone" "optimized" { target ilp32 } } } */
+! { dg-final { scan-tree-dump-not "sin.simdclone" "optimized" { target ilp32 } } } */
+
+! { dg-final { scan-tree-dump "sin.simdclone" "optimized" { target lp64 } } } */
+! { dg-final { scan-tree-dump-not "sinf.simdclone" "optimized" { target lp64  } } } */
diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-8.h b/gcc/testsuite/gfortran.dg/simd-builtins-8.h
new file mode 100644 (file)
index 0000000..2eade39
--- /dev/null
@@ -0,0 +1,4 @@
+!GCC$ builtin (sin) attributes simd (notinbranch) if('aarch64')
+!GCC$ builtin (sin) attributes simd (notinbranch) if('aarch64_be')
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('aarch64_ilp32')
+!GCC$ builtin (sinf) attributes simd (notinbranch) if('aarch64_be_ilp32')