From: Steve Ellcey Date: Wed, 27 Feb 2019 00:02:53 +0000 (+0000) Subject: simd-builtins-1.f90: Update for aarch64*-*-*. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd3706d65ac338bf466490822aa5af999af5dcac;p=gcc.git simd-builtins-1.f90: Update for aarch64*-*-*. 2018-02-26 Steve Ellcey * 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 14a8f541e81..807c04567f5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-02-26 Steve Ellcey + + * 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 PR c++/89507 diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-1.f90 b/gcc/testsuite/gfortran.dg/simd-builtins-1.f90 index 6d79ef8dc46..5cb3eb5132a 100644 --- a/gcc/testsuite/gfortran.dg/simd-builtins-1.f90 +++ b/gcc/testsuite/gfortran.dg/simd-builtins-1.f90 @@ -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*-*-* } } } diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-2.f90 b/gcc/testsuite/gfortran.dg/simd-builtins-2.f90 index f0e6bc13862..2e5bc22716b 100644 --- a/gcc/testsuite/gfortran.dg/simd-builtins-2.f90 +++ b/gcc/testsuite/gfortran.dg/simd-builtins-2.f90 @@ -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" } } diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-6.f90 b/gcc/testsuite/gfortran.dg/simd-builtins-6.f90 index 2ffa807e6b6..60bcac78f3e 100644 --- a/gcc/testsuite/gfortran.dg/simd-builtins-6.f90 +++ b/gcc/testsuite/gfortran.dg/simd-builtins-6.f90 @@ -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 index 00000000000..0237235b5ae --- /dev/null +++ b/gcc/testsuite/gfortran.dg/simd-builtins-8.f90 @@ -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 index 00000000000..2eade390b37 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/simd-builtins-8.h @@ -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')