aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/simd-builtins-1.f90
blob: e5ee380943f65fbff17b9779586b2e463581005d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } }
! { dg-additional-options "-msse2 -nostdinc -Ofast -fpre-include=simd-builtins-1.h -fdump-tree-optimized" }

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" } }