From: Aaron Sawdey Date: Sat, 8 Apr 2017 16:10:26 +0000 (+0000) Subject: re PR rtl-optimization/80358 (ICE (cc1 killed) building glib with -O3 on powerpc64le... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27ba97a67a5e468317b3316224e82f4f7b680b71;p=gcc.git re PR rtl-optimization/80358 (ICE (cc1 killed) building glib with -O3 on powerpc64le-linux-gnu) 2017-04-08 Aaron Sawdey PR target/80358 * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check. From-SVN: r246784 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99d78b459a9..b1e034596da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-08 Aaron Sawdey + + PR target/80358 + * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check. + 2017-04-07 Pat Haugen * rs6000/rs6000.c (vec_load_pendulum): Rename... diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b3a3a7ec6e9..880c3eea1d8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -19672,8 +19672,9 @@ expand_block_compare (rtx operands[]) unsigned int load_mode_size = GET_MODE_SIZE (load_mode); /* We don't want to generate too much code. */ - if (ROUND_UP (bytes, load_mode_size) / load_mode_size - > (unsigned HOST_WIDE_INT) rs6000_block_compare_inline_limit) + unsigned HOST_WIDE_INT max_bytes = + load_mode_size * (unsigned HOST_WIDE_INT) rs6000_block_compare_inline_limit; + if (!IN_RANGE (bytes, 1, max_bytes)) return false; bool generate_6432_conversion = false;