aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/simd-builtins-6.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/simd-builtins-6.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/simd-builtins-6.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/simd-builtins-6.f90 b/gcc/testsuite/gfortran.dg/simd-builtins-6.f90
new file mode 100644
index 0000000..5ff9921
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/simd-builtins-6.f90
@@ -0,0 +1,24 @@
+! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
+! { dg-additional-options "-msse2 -nostdinc -Ofast -fdump-tree-optimized" }
+
+!GCC$ builtin (sin) attributes simd (inbranch)
+!GCC$ builtin (sinf) attributes simd (notinbranch)
+!GCC$ builtin (cosf) attributes simd
+!GCC$ builtin (cosf) attributes simd (notinbranch)
+
+program test_overloaded_intrinsic
+ real(4) :: x4(3200), y4(3200)
+ real(8) :: x8(3200), y8(3200)
+
+ ! this should be using simd clone
+ y4 = sin(x4)
+ print *, y4
+
+ ! this should not be using simd clone
+ y4 = sin(x8)
+ 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" } }