+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
-! { 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)
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*-*-* } } }
-! { 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
! { 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" } }
-! { 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)
! { 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*-*-* } } }
--- /dev/null
+! { 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 } } } */
--- /dev/null
+!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')