From: Aaron Sawdey Date: Thu, 29 Nov 2018 03:56:14 +0000 (+0000) Subject: rs6000-string.c (expand_block_clear): Change how we determine if unaligned vsx is ok. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=645eee7431fef4cc37c5307a6c6f81fcc6c553d4;p=gcc.git rs6000-string.c (expand_block_clear): Change how we determine if unaligned vsx is ok. 2018-11-28 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_block_clear): Change how we determine if unaligned vsx is ok. From-SVN: r266599 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6607cd7c710..98f4f3fe3a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-28 Aaron Sawdey + + * config/rs6000/rs6000-string.c (expand_block_clear): Change how + we determine if unaligned vsx is ok. + 2018-11-28 Jan Hubicka * predict.c (determine_unlikely_bbs): Forward declare; also determine diff --git a/gcc/config/rs6000/rs6000-string.c b/gcc/config/rs6000/rs6000-string.c index 620be2b7325..bc5bec2045e 100644 --- a/gcc/config/rs6000/rs6000-string.c +++ b/gcc/config/rs6000/rs6000-string.c @@ -85,14 +85,15 @@ expand_block_clear (rtx operands[]) if (! optimize_size && bytes > 8 * clear_step) return 0; + bool unaligned_vsx_ok = (bytes >= 32 && TARGET_EFFICIENT_UNALIGNED_VSX); + for (offset = 0; bytes > 0; offset += clear_bytes, bytes -= clear_bytes) { machine_mode mode = BLKmode; rtx dest; if (TARGET_ALTIVEC - && ((bytes >= 16 && align >= 128) - || (bytes >= 32 && TARGET_EFFICIENT_UNALIGNED_VSX))) + && (bytes >= 16 && (align >= 128 || unaligned_vsx_ok))) { clear_bytes = 16; mode = V4SImode;