[gcc(refs/users/macro/heads/vax-mode-cc)] PDP11: Use `const_double_zero' to express double zero constant

Maciej W. Rozycki macro@gcc.gnu.org
Fri Nov 20 03:40:14 GMT 2020


https://gcc.gnu.org/g:2d6ac1d56b1bab2a1c24b43504f3cc800159a9fc

commit 2d6ac1d56b1bab2a1c24b43504f3cc800159a9fc
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Fri Nov 20 02:26:56 2020 +0000

    PDP11: Use `const_double_zero' to express double zero constant
    
    We do not define a comparison operation between floating-point and
    integer data, including integer zero constant.  Consequently the RTL
    instruction stream presented to the post-reload comparison elimination
    pass will include, where applicable, floating-point comparison insns
    against `const_double:DF 0.0 [0x0.0p+0]' rather than `const_int 0 [0]',
    meaning that the latter expression will not match when used in machine
    description.
    
    Use `const_double_zero' then for the relevant patterns to match the
    intended RTL instructions.
    
            gcc/
            * config/pdp11/pdp11.md (fcc_cc, fcc_ccnz): Use
            `const_double_zero' to express double zero constant.

Diff:
---
 gcc/config/pdp11/pdp11.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md
index 7a4d50fdba9..cdef49f3979 100644
--- a/gcc/config/pdp11/pdp11.md
+++ b/gcc/config/pdp11/pdp11.md
@@ -105,7 +105,7 @@
    (clobber (reg FCC_REGNUM))]
   ""
   [(set (reg:CC FCC_REGNUM)
-	(compare:CC (match_dup 1) (const_int 0)))
+	(compare:CC (match_dup 1) (const_double_zero)))
    (set (match_dup 0) (match_dup 1))])
 
 (define_subst "fcc_ccnz"
@@ -113,7 +113,7 @@
    (clobber (reg FCC_REGNUM))]
   ""
   [(set (reg:CCNZ FCC_REGNUM)
-	(compare:CCNZ (match_dup 1) (const_int 0)))
+	(compare:CCNZ (match_dup 1) (const_double_zero)))
    (set (match_dup 0) (match_dup 1))])
 
 (define_subst_attr "cc_cc" "cc_cc" "_nocc" "_cc")


More information about the Gcc-cvs mailing list