summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/mips-div-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/mips-div-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/mips-div-1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/mips-div-1.c b/gcc/testsuite/gcc.dg/torture/mips-div-1.c
new file mode 100644
index 000000000..6345000fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/mips-div-1.c
@@ -0,0 +1,9 @@
+/* Check that hard-float MIPS code doesn't use library calls for 1.0/x. */
+/* { dg-options "-fno-delayed-branch" } */
+/* { dg-do compile { target mips*-*-* } } */
+
+float f1 (float x) { return 1.0f / x; }
+double f2 (double x) { return 1.0 / x; }
+
+/* { dg-final { scan-assembler-not {lwc1.*__divsf3} } } */
+/* { dg-final { scan-assembler-not {ldc1.*__divdf3} } } */