2ffa807e6b68a5537245a10c2683621e5864a3d3
[gcc.git] / gcc / testsuite / gfortran.dg / simd-builtins-6.f90
1 ! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
2 ! { dg-additional-options "-msse2 -mno-avx -nostdinc -Ofast -fdump-tree-optimized" }
3
4 !GCC$ builtin (sin) attributes simd (inbranch)
5 !GCC$ builtin (sinf) attributes simd (notinbranch)
6 !GCC$ builtin (cosf) attributes simd
7 !GCC$ builtin (cosf) attributes simd (notinbranch)
8
9 program test_overloaded_intrinsic
10 real(4) :: x4(3200), y4(3200)
11 real(8) :: x8(3200), y8(3200)
12
13 ! this should be using simd clone
14 y4 = sin(x4)
15 print *, y4
16
17 ! this should not be using simd clone
18 y4 = sin(x8)
19 print *, y8
20 end
21
22 ! { dg-final { scan-tree-dump "sinf.simdclone" "optimized" } } */
23 ! { dg-final { scan-tree-dump "__builtin_sin" "optimized" } } */
24 ! { dg-final { scan-assembler "call.*_ZGVbN4v_sinf" } }