http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51134
--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> 2011-11-15 13:28:42 UTC --- Hi, the bug is loopy epilogue not being used because promoted value is not availbale. The non-loopy epilogue does not expect alignments greater than 16. I am testing the following patch. I think we might still have bugs for blocks >8 && <16. Will try to produce testcase. Honza Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 181357) +++ config/i386/i386.c (working copy) @@ -23073,13 +23073,13 @@ ix86_expand_setmem (rtx dst, rtx count_e rtx tmp; if (align_unknown && unroll_factor > 1 && epilogue_size_needed >= GET_MODE_SIZE (move_mode) - && vec_promoted_val) + && (vec_promoted_val || gpr_promoted_val)) { /* Reduce epilogue's size by creating not-unrolled loop. If we won't do this, we can have very big epilogue - when alignment is statically unknown we'll have the epilogue byte by byte which may be very slow. */ loop_iter = expand_set_or_movmem_via_loop_with_iter (dst, NULL, destreg, - NULL, vec_promoted_val, count_exp, + NULL, vec_promoted_val ? vec_promoted_val : gpr_promoted_val, count_exp, loop_iter, move_mode, 1, expected_size, false); dst = change_address (dst, BLKmode, destreg);