Fix bits/bytes confusion in latest change to expand_unop
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 2 Jun 2020 11:14:55 +0000 (13:14 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 2 Jun 2020 11:16:59 +0000 (13:16 +0200)
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.

gcc/optabs.c
gcc/tree-pretty-print.c

index 7a4ec1ec01c6b0ab09ce7390a025ddf6e759f1a9..6d0b76c13badd218f0a61a780f8ba48a9241a615 100644 (file)
@@ -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);
index f04fd65091aa9f2a2f86a7c237d77fa1aa77d40a..7d5812140227ee17a22b6525135f000f244b08f9 100644 (file)
@@ -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))