On Linux/ia32, revision 139863 gave FAIL: gcc.dg/array-init-1.c scan-assembler-not abcdefghi FAIL: gcc.dg/array-init-1.c scan-assembler-times 7017280452245743464|7523094288207667809|6867666564636261|1684234849|64636261 2 revision 139848 is OK.
Revision 139854 is OK and revision 139856 is bad.
The problem here is that gimplify_init_constructor calls can_move_by_pieces, and the default MOVE_BY_PIECES_P uses optimize_insn_for_speed_p: #define MOVE_BY_PIECES_P(SIZE, ALIGN) \ (move_by_pieces_ninsns (SIZE, ALIGN, MOVE_MAX_PIECES + 1) \ < (unsigned int) MOVE_RATIO (optimize_insn_for_speed_p ())) But during gimplification *crtl is cleared, so eventhough optimize_function_for_speed_p (cfun) is true, crtl->maybe_hot_insn_p is false. Should gimplify_init_constructor temporarily set crtl->maybe_hot_insn_p = true?
Subject: Bug 37338 Author: jakub Date: Wed Sep 10 21:08:17 2008 New Revision: 140249 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140249 Log: PR middle-end/37338 * gimplify.c (gimplify_body): Call default_rtl_profile. Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c
Fixed.