public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jiu Fu Guo <guojiufu@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/guojiufu/heads/guojiufu-branch)] Fix bits/bytes confusion in latest change to expand_unop
Date: Wed, 10 Jun 2020 03:25:13 +0000 (GMT)	[thread overview]
Message-ID: <20200610032513.EE829388C025@sourceware.org> (raw)

https://gcc.gnu.org/g:0bd4508f86889995f6864bf50773bd6859951007

commit 0bd4508f86889995f6864bf50773bd6859951007
Author: Eric Botcazou <ebotcazou@gcc.gnu.org>
Date:   Tue Jun 2 13:14:55 2020 +0200

    Fix bits/bytes confusion in latest change to expand_unop
    
    gcc/ChangeLog:
            PR middle-end/95395
            * optabs.c (expand_unop): Fix bits/bytes confusion in latest change.
    
            * tree-pretty-print.c (dump_generic_node) <ARRAY_TYPE>: Print quals.

Diff:
---
 gcc/optabs.c            | 2 +-
 gcc/tree-pretty-print.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/gcc/optabs.c b/gcc/optabs.c
index 7a4ec1ec01c..6d0b76c13ba 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -2892,7 +2892,7 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target,
 	  /* We do not provide a 128-bit bswap in libgcc so force the use of
 	     a double bswap for 64-bit targets.  */
 	  if (GET_MODE_SIZE (int_mode) == 2 * UNITS_PER_WORD
-	      && (UNITS_PER_WORD == 64
+	      && (UNITS_PER_WORD == 8
 		  || optab_handler (unoptab, word_mode) != CODE_FOR_nothing))
 	    {
 	      temp = expand_doubleword_bswap (mode, op0, target);
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index f04fd65091a..7d581214022 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -1899,8 +1899,16 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
 
     case ARRAY_TYPE:
       {
+	unsigned int quals = TYPE_QUALS (node);
 	tree tmp;
 
+	if (quals & TYPE_QUAL_ATOMIC)
+	  pp_string (pp, "atomic ");
+	if (quals & TYPE_QUAL_CONST)
+	  pp_string (pp, "const ");
+	if (quals & TYPE_QUAL_VOLATILE)
+	  pp_string (pp, "volatile ");
+
 	/* Print the innermost component type.  */
 	for (tmp = TREE_TYPE (node); TREE_CODE (tmp) == ARRAY_TYPE;
 	     tmp = TREE_TYPE (tmp))


                 reply	other threads:[~2020-06-10  3:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200610032513.EE829388C025@sourceware.org \
    --to=guojiufu@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).