expr.c (emit_block_move_hints): Slightly cleaner fix to can_move_by_pieces issue.
authorAaron Sawdey <acsawdey@linux.ibm.com>
Thu, 3 Oct 2019 22:19:14 +0000 (22:19 +0000)
committerAaron Sawdey <acsawdey@gcc.gnu.org>
Thu, 3 Oct 2019 22:19:14 +0000 (17:19 -0500)
2019-10-03  Aaron Sawdey <acsawdey@linux.ibm.com>

* expr.c (emit_block_move_hints): Slightly cleaner fix to
can_move_by_pieces issue.

From-SVN: r276542

gcc/ChangeLog
gcc/expr.c

index 9be4a6f7f6e661b3eae647ffa0ab9aad13f6cf60..73c45b340f4d0515207951383ffc392623a7cdb9 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-03  Aaron Sawdey <acsawdey@linux.ibm.com>
+
+       * expr.c (emit_block_move_hints): Slightly cleaner fix to
+       can_move_by_pieces issue.
+
 2019-10-03  Iain Sandoe  <iain@sandoe.co.uk>
 
        PR target/87243
index c4210547aee66cd40523c08100c2ee491399ca1b..2ee2906b7948b7a94f4920a2e59a09e0e8b9bc2d 100644 (file)
@@ -1624,9 +1624,8 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enum block_op_methods method,
       set_mem_size (y, const_size);
     }
 
-  bool pieces_ok = false;
-  if (CONST_INT_P (size))
-    pieces_ok = can_move_by_pieces (INTVAL (size), align);
+  bool pieces_ok = CONST_INT_P (size)
+    && can_move_by_pieces (INTVAL (size), align);
   bool pattern_ok = false;
 
   if (!pieces_ok || might_overlap)