diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-07-16 13:07:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-07-16 13:07:54 +0200 |
commit | 6972c506d47a918744940e9af28a85d67e446090 (patch) | |
tree | efc88435e879f232e0d801e92e70d1911d536391 /gcc/expr.c | |
parent | ac59ed379bee7707f973c3cc2bafa536a9c5a032 (diff) | |
download | gcc-6972c506d47a918744940e9af28a85d67e446090.zip gcc-6972c506d47a918744940e9af28a85d67e446090.tar.gz gcc-6972c506d47a918744940e9af28a85d67e446090.tar.bz2 |
expr.c (emit_block_move): Don't move anything if size is const 0.
* expr.c (emit_block_move): Don't move anything if size is const 0.
(clear_storage): Test against const0_rtx instead of comparing INTVAL
against 0.
From-SVN: r69441
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1766,6 +1766,9 @@ emit_block_move (rtx x, rtx y, rtx size, enum block_op_methods method) can be incorrect is coming from __builtin_memcpy. */ if (GET_CODE (size) == CONST_INT) { + if (INTVAL (size) == 0) + return 0; + x = shallow_copy_rtx (x); y = shallow_copy_rtx (y); set_mem_size (x, size); @@ -2975,7 +2978,7 @@ clear_storage (rtx object, rtx size) object = protect_from_queue (object, 1); size = protect_from_queue (size, 0); - if (GET_CODE (size) == CONST_INT && INTVAL (size) == 0) + if (size == const0_rtx) ; else if (GET_CODE (size) == CONST_INT && CLEAR_BY_PIECES_P (INTVAL (size), align)) |