This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC patch]: Fix PR target/24315

On 10/14/05, Richard Henderson <> wrote:

> >       * config/i386/ (*movdi_1_rex64 splitter): Do not depend
> >       on flag_peephole2, split unconditionally after reload.
> This should be wrong, since the reason for this form is to
> allow peep2 to operate on the pattern instead of having it
> split in the first post-reload pass.

The problem was in splitter enable constraint, because peephole2 pass
is gated with:

static bool
gate_handle_peephole2 (void)
  return (optimize > 0 && flag_peephole2);

Peephole2 pass does not run for -O0, even if -fpeephole2 is used.

Attached patch delays splitters only when (optimize > 0 &&
flag_peephole2), matching exact peephole2 pass gate condition. This
patch addresses all flag_peephole2 users in

I have committed the patch under obvious rule after bootstrapping it
on i686-pc-linux-gnu, regtesting for c and c++ . Additionally,
testcase was crosscompiled to x86_64 and the code was checked for

2005-10-17  Uros Bizjak  <>

	PR target/24315
	* config/i386/ (*pushdi2_rex64 splitter)
	(*movdi_1_rex64 splitter, *ashldi3_1 splitter)
	(*ashrdi3_1 splitter, *lshrdi3_1 splitter): Delay splitting after
	flow2 pass only when (optimize > 0 && flag_peephole2).


	PR target/24315
	* New test.


Attachment: pr24315.diff
Description: Binary data

Attachment: pr24315.c
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]