* [PATCH, i386]: Use ROUND_DOWN some more
@ 2015-10-09 16:56 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2015-10-09 16:56 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
Hello!
No functional changes.
2015-10-09 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c
(expand_set_or_movmem_prologue_epilogue_by_misaligned_moves): Use
ROUND_DOWN where applicable.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32},
committed to mainline SVN:
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1155 bytes --]
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 228640)
+++ config/i386/i386.c (working copy)
@@ -25564,7 +25564,8 @@ expand_set_or_movmem_prologue_epilogue_by_misalign
saveddest, *count, 1, OPTAB_DIRECT);
/* We copied at most size + prolog_size. */
if (*min_size > (unsigned HOST_WIDE_INT)(size + prolog_size))
- *min_size = (*min_size - size) & ~(unsigned HOST_WIDE_INT)(size - 1);
+ *min_size
+ = ROUND_DOWN (*min_size - size, (unsigned HOST_WIDE_INT)size);
else
*min_size = 0;
@@ -25582,9 +25583,10 @@ expand_set_or_movmem_prologue_epilogue_by_misalign
*count = expand_simple_binop (GET_MODE (*count), PLUS, *count,
constm1_rtx, *count, 1, OPTAB_DIRECT);
else
- *count = GEN_INT ((UINTVAL (*count) - 1) & ~(unsigned HOST_WIDE_INT)(size - 1));
+ *count = GEN_INT (ROUND_DOWN (UINTVAL (*count) - 1,
+ (unsigned HOST_WIDE_INT)size));
if (*min_size)
- *min_size = (*min_size - 1) & ~(unsigned HOST_WIDE_INT)(size - 1);
+ *min_size = ROUND_DOWN (*min_size - 1, (unsigned HOST_WIDE_INT)size);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-09 16:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 16:56 [PATCH, i386]: Use ROUND_DOWN some more Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).