aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c b/gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c
new file mode 100644
index 000000000..71522c8d9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/sh/pr53512-3.c
@@ -0,0 +1,15 @@
+/* Verify that the fsrra insn is used when specifying -mfsrra and
+ -funsafe-math-optimizations and -ffinite-math-only. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mfsrra -funsafe-math-optimizations -ffinite-math-only" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m3*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fsrra" } } */
+
+#include <math.h>
+
+float
+test_func_00 (float x)
+{
+ return 1 / sqrtf (x);
+}
+