diff options
author | Richard Biener <rguenther@suse.de> | 2019-02-15 07:39:45 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-02-15 08:39:45 +0100 |
commit | 4c9ed22ae08c2b621efd6c8a1600e47b67d66c66 (patch) | |
tree | 3c0b3134250d40992538c3f58ee47fd7448734e7 /gcc/tree-loop-distribution.c | |
parent | 5f88ba10e017ec213b0fc4e1b0cd63f3dfcb6660 (diff) | |
download | gcc-4c9ed22ae08c2b621efd6c8a1600e47b67d66c66.zip gcc-4c9ed22ae08c2b621efd6c8a1600e47b67d66c66.tar.gz gcc-4c9ed22ae08c2b621efd6c8a1600e47b67d66c66.tar.bz2 |
re PR tree-optimization/89278 (ICE in gimplify_modify_expr, at gimplify.c:5821)
PR tree-optimization/89278
* tree-loop-distribution.c: Include tree-eh.h.
(generate_memset_builtin, generate_memcpy_builtin): Call
rewrite_to_non_trapping_overflow on builtin->size before passing it
to force_gimple_operand_gsi.
* gcc.dg/pr89278.c: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r268927
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 7df052d..066356f 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -114,6 +114,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-scalar-evolution.h" #include "params.h" #include "tree-vectorizer.h" +#include "tree-eh.h" #define MAX_DATAREFS_NUM \ @@ -996,7 +997,7 @@ generate_memset_builtin (struct loop *loop, partition *partition) /* The new statements will be placed before LOOP. */ gsi = gsi_last_bb (loop_preheader_edge (loop)->src); - nb_bytes = builtin->size; + nb_bytes = rewrite_to_non_trapping_overflow (builtin->size); nb_bytes = force_gimple_operand_gsi (&gsi, nb_bytes, true, NULL_TREE, false, GSI_CONTINUE_LINKING); mem = builtin->dst_base; @@ -1048,7 +1049,7 @@ generate_memcpy_builtin (struct loop *loop, partition *partition) /* The new statements will be placed before LOOP. */ gsi = gsi_last_bb (loop_preheader_edge (loop)->src); - nb_bytes = builtin->size; + nb_bytes = rewrite_to_non_trapping_overflow (builtin->size); nb_bytes = force_gimple_operand_gsi (&gsi, nb_bytes, true, NULL_TREE, false, GSI_CONTINUE_LINKING); dest = builtin->dst_base; |