This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Remove dead x87 cbranch helpers
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches\@gcc.gnu.org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Oct 2017 17:39:44 +0200
- Subject: Re: [PATCH, i386]: Remove dead x87 cbranch helpers
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Zt5tZs84PMzZ7xG2gWqae8BW=_1ifGCVdsK-dMSJxy4Q@mail.gmail.com>
Hi Uros,
> Remove dead code, obsoleted by cbranch rewrite years ago.
>
> 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
> Do not use float_operator operator predicate.
> (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
> * config/i386/predicates.md (float_operator): Remove predicate.
>
> 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
> (*jccxf_i387): Ditto.
> (*jcc<mode>_i387): Ditto.
> (*jccu<mode>_i387): Ditto.
> (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
> (*jcc_*_i387 splitters): Remove.
> * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
> * config/i386/i386.c (ix86_split_fp_branch): Remove.
> * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
> Remove predicate.
>
> testsuite/ChangeLog:
>
> 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
>
> * gcc.target/i386/387-ficom-1.c: New test.
>
> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> Committed to mainline SVN.
the new testcase and its 387-ficom-2.c companion FAIL on Solaris/x86
with /bin/as:
+FAIL: gcc.target/i386/387-ficom-1.c scan-assembler-times ficomps 3 (found 0 times)
+FAIL: gcc.target/i386/387-ficom-2.c scan-assembler-times ficomps 3 (found 0 times)
With gas, it's
ficomps s
ficomps s
ficomps 4(%esp)
while for Solaris as this is used:
ficomp s
ficomp s
ficomp 4(%esp)
The following patch accounts for the difference. Tested with the
appropriate runtest invocation on i386-pc-solaris2.11 and
x86_64-pc-linux-gnu. Ok for mainline?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2017-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.target/i386/387-ficom-1.c: Allow for ficomp without s
suffix.
* gcc.target/i386/387-ficom-2.c: Likewise.
# HG changeset patch
# Parent e3f08cd42041c7f5a362af1f3ab8c05f320f0a67
Fix gcc.target/i386/387-ficom-[12].c on Solaris
diff --git a/gcc/testsuite/gcc.target/i386/387-ficom-1.c b/gcc/testsuite/gcc.target/i386/387-ficom-1.c
--- a/gcc/testsuite/gcc.target/i386/387-ficom-1.c
+++ b/gcc/testsuite/gcc.target/i386/387-ficom-1.c
@@ -37,5 +37,5 @@ int test_ld_i (int x)
return (long double)i != x;
}
-/* { dg-final { scan-assembler-times "ficomps" 3 } } */
+/* { dg-final { scan-assembler-times "ficomp\[s\t\]" 3 } } */
/* { dg-final { scan-assembler-times "ficompl" 3 } } */
diff --git a/gcc/testsuite/gcc.target/i386/387-ficom-2.c b/gcc/testsuite/gcc.target/i386/387-ficom-2.c
--- a/gcc/testsuite/gcc.target/i386/387-ficom-2.c
+++ b/gcc/testsuite/gcc.target/i386/387-ficom-2.c
@@ -5,5 +5,5 @@
#include "387-ficom-1.c"
-/* { dg-final { scan-assembler-times "ficomps" 3 } } */
+/* { dg-final { scan-assembler-times "ficomp\[s\t\]" 3 } } */
/* { dg-final { scan-assembler-times "ficompl" 3 } } */