Commit f50d71ec by Vladimir Makarov Committed by Vladimir Makarov

re PR debug/61923 (-fcompare-debug errors while building Linux kernel.)

2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/61923
	* haifa-sched.c (advance_one_cycle): Fix dump.
	(schedule_block): Don't advance cycle if we are already at the
	beginning of the cycle.

2014-08-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/61923
	* gcc.target/i386/pr61923.c: New test.

From-SVN: r213675
parent 9d6171dc
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* haifa-sched.c (advance_one_cycle): Fix dump.
(schedule_block): Don't advance cycle if we are already at the
beginning of the cycle.
2014-08-06 Martin Jambor <mjambor@suse.cz> 2014-08-06 Martin Jambor <mjambor@suse.cz>
PR ipa/61393 PR ipa/61393
......
...@@ -2970,7 +2970,7 @@ advance_one_cycle (void) ...@@ -2970,7 +2970,7 @@ advance_one_cycle (void)
{ {
advance_state (curr_state); advance_state (curr_state);
if (sched_verbose >= 4) if (sched_verbose >= 4)
fprintf (sched_dump, ";;\tAdvanced a state.\n"); fprintf (sched_dump, ";;\tAdvance the current state.\n");
} }
/* Update register pressure after scheduling INSN. */ /* Update register pressure after scheduling INSN. */
...@@ -6052,6 +6052,7 @@ schedule_block (basic_block *target_bb, state_t init_state) ...@@ -6052,6 +6052,7 @@ schedule_block (basic_block *target_bb, state_t init_state)
modulo_insns_scheduled = 0; modulo_insns_scheduled = 0;
ls.modulo_epilogue = false; ls.modulo_epilogue = false;
ls.first_cycle_insn_p = true;
/* Loop until all the insns in BB are scheduled. */ /* Loop until all the insns in BB are scheduled. */
while ((*current_sched_info->schedule_more_p) ()) while ((*current_sched_info->schedule_more_p) ())
...@@ -6122,7 +6123,6 @@ schedule_block (basic_block *target_bb, state_t init_state) ...@@ -6122,7 +6123,6 @@ schedule_block (basic_block *target_bb, state_t init_state)
if (must_backtrack) if (must_backtrack)
goto do_backtrack; goto do_backtrack;
ls.first_cycle_insn_p = true;
ls.shadows_only_p = false; ls.shadows_only_p = false;
cycle_issued_insns = 0; cycle_issued_insns = 0;
ls.can_issue_more = issue_rate; ls.can_issue_more = issue_rate;
...@@ -6409,10 +6409,12 @@ schedule_block (basic_block *target_bb, state_t init_state) ...@@ -6409,10 +6409,12 @@ schedule_block (basic_block *target_bb, state_t init_state)
break; break;
} }
} }
ls.first_cycle_insn_p = true;
} }
if (ls.modulo_epilogue) if (ls.modulo_epilogue)
success = true; success = true;
end_schedule: end_schedule:
if (!ls.first_cycle_insn_p)
advance_one_cycle (); advance_one_cycle ();
perform_replacements_new_cycle (); perform_replacements_new_cycle ();
if (modulo_ii > 0) if (modulo_ii > 0)
......
2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
PR debug/61923
* gcc.target/i386/pr61923.c: New test.
2014-08-06 Alan Lawrence <alan.lawrence@arm.com> 2014-08-06 Alan Lawrence <alan.lawrence@arm.com>
* gcc.target/aarch64/vdup_n_2.c: New test. * gcc.target/aarch64/vdup_n_2.c: New test.
......
/* PR debug/61923 */
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
typedef struct
{
struct
{
struct
{
char head;
} tickets;
};
} arch_spinlock_t;
struct ext4_map_blocks
{
int m_lblk;
int m_len;
int m_flags;
};
int ext4_da_map_blocks_ei_0;
void fn1 (int p1, struct ext4_map_blocks *p2)
{
int ret;
if (p2->m_flags)
{
ext4_da_map_blocks_ei_0++;
arch_spinlock_t *lock;
switch (sizeof *&lock->tickets.head)
case 1:
asm("" : "+m"(*&lock->tickets.head) : ""(0));
__asm__("");
ret = 0;
}
fn2 (p2->m_lblk, p2->m_len);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment