public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Jeff Law <law@redhat.com>, Paul Koning <paulkoning@comcast.net>,
	Richard Sandiford <richard.sandiford@arm.com>,
	gcc-patches@gcc.gnu.org
Subject: [PATCH 3/4] VAX: Use a mode with `const_double_zero' expressions
Date: Fri, 8 Jan 2021 01:50:27 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.21.2101080134480.1637534@eddie.linux-mips.org> (raw)
In-Reply-To: <alpine.LFD.2.21.2101072204040.1637534@eddie.linux-mips.org>

For predictable semantics propagate the mode from operands referred by 
the FP substitution to the `const_double_zero' expressions used with the 
associated condition code calculation.  Use an iterator to make copies 
of the FP substitution across the FP modes supported as the substitution 
now has to match the mode of the operands.

	gcc/
	* config/pdp11/pdp11.md (subst_f<cc>): Add mode to operands and 
	`const_double_zero'.
---
 gcc/config/vax/vax.md |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

gcc-vax-const-double-zero-mode.diff
Index: gcc/gcc/config/vax/vax.md
===================================================================
--- gcc.orig/gcc/config/vax/vax.md
+++ gcc/gcc/config/vax/vax.md
@@ -79,13 +79,13 @@
 	(match_dup 1))])
 
 (define_subst "subst_f<cc>"
-  [(set (match_operand 0 "")
-	(match_operand 1 ""))
+  [(set (match_operand:VAXfp 0 "")
+	(match_operand:VAXfp 1 ""))
    (clobber (reg:CC VAX_PSL_REGNUM))]
   ""
   [(set (reg:VAXccnz VAX_PSL_REGNUM)
 	(compare:VAXccnz (match_dup 1)
-			 (const_double_zero)))
+			 (const_double_zero:VAXfp)))
    (set (match_dup 0)
 	(match_dup 1))])
 

  parent reply	other threads:[~2021-01-08  1:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  1:50 [PATCH 0/4] Fixes for `const_double_zero' use + VAX iterator simplification Maciej W. Rozycki
2021-01-08  1:50 ` [PATCH 1/4] RTL: Update `const_double_zero' handling for mode and callable insns Maciej W. Rozycki
2021-01-08 20:11   ` Jeff Law
2021-01-08  1:50 ` [PATCH 2/4] PDP11: Use a mode with `const_double_zero' expressions Maciej W. Rozycki
2021-01-08 15:04   ` Paul Koning
2021-01-10 14:34     ` Maciej W. Rozycki
2021-01-08  1:50 ` Maciej W. Rozycki [this message]
2021-01-08 20:11   ` [PATCH 3/4] VAX: " Jeff Law
2021-01-08  1:51 ` [PATCH 4/4] VAX: Remove a duplicate `cc' mode attribute Maciej W. Rozycki
2021-01-08 20:11   ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2101080134480.1637534@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=paulkoning@comcast.net \
    --cc=richard.sandiford@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).