164775Sbrian/* Test whether using target specific options, we can generate the reciprocal 264775Sbrian square root instruction. */ 364775Sbrian/* { dg-do compile } */ 464775Sbrian/* { dg-options "-O2 -march=k8 -mno-recip -mfpmath=sse -ffast-math" } */ 564775Sbrian 664775Sbrianfloat do_recip (float a) __attribute__((__target__("recip"))); 764775Sbrianfloat do_normal (float a); 864775Sbrian 964775Sbrianfloat do_recip (float a) { return 1.0f / __builtin_sqrtf (a); } 1064775Sbrianfloat do_normal (float a) { return 1.0f / __builtin_sqrtf (a); } 1164775Sbrian 1264775Sbrian/* { dg-final { scan-assembler "sqrtss" } } */ 1364775Sbrian/* { dg-final { scan-assembler "rsqrtss" } } */ 1464775Sbrian