Bug 37338 - [4.4 Regression] gcc.dg/array-init-1.c
Summary: [4.4 Regression] gcc.dg/array-init-1.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 18:52 UTC by H.J. Lu
Modified: 2008-09-10 21:09 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-09-10 09:11:11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2008-09-02 18:52:47 UTC
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.
Comment 1 H.J. Lu 2008-09-02 18:56:25 UTC
Revision 139854 is OK and revision 139856 is bad.
Comment 2 Jakub Jelinek 2008-09-09 17:50:46 UTC
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?

Comment 3 Jakub Jelinek 2008-09-10 21:09:38 UTC
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

Comment 4 Jakub Jelinek 2008-09-10 21:09:46 UTC
Fixed.