Commit 5ef5a3b7 by Jakub Jelinek

re PR rtl-optimization/54455 (ICE: RTL check: expected elt 3 type 'B', have '0'…

re PR rtl-optimization/54455 (ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in compute_bb_for_insn, at cfgrtl.c:418)

	PR rtl-optimization/54455
	* sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru
	bb ends up with asm goto referencing bb's label.

	* gcc.dg/54455.c: New test.

From-SVN: r191013
parent 3dcdfdc8
2012-09-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/54455
* sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru
bb ends up with asm goto referencing bb's label.
2012-09-06 Chen Liqin <liqin.gcc@gmail.com> 2012-09-06 Chen Liqin <liqin.gcc@gmail.com>
* config/score/score.c: Remove TARGET_LEGITIMIZE_ADDRESS define * config/score/score.c: Remove TARGET_LEGITIMIZE_ADDRESS define
......
2012-09-06 Tobias Burnus 2012-09-06 Tobias Burnus <burnus@net-b.de>
PR fortran/54463 PR fortran/54463
* trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
......
/* Instruction scheduling pass. Selective scheduler and pipeliner. /* Instruction scheduling pass. Selective scheduler and pipeliner.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -3686,6 +3686,22 @@ maybe_tidy_empty_bb (basic_block bb) ...@@ -3686,6 +3686,22 @@ maybe_tidy_empty_bb (basic_block bb)
FOR_EACH_EDGE (e, ei, bb->preds) FOR_EACH_EDGE (e, ei, bb->preds)
if (e->flags & EDGE_COMPLEX) if (e->flags & EDGE_COMPLEX)
return false; return false;
else if (e->flags & EDGE_FALLTHRU)
{
rtx note;
/* If prev bb ends with asm goto, see if any of the
ASM_OPERANDS_LABELs don't point to the fallthru
label. Do not attempt to redirect it in that case. */
if (JUMP_P (BB_END (e->src))
&& (note = extract_asm_operands (PATTERN (BB_END (e->src)))))
{
int i, n = ASM_OPERANDS_LABEL_LENGTH (note);
for (i = 0; i < n; ++i)
if (XEXP (ASM_OPERANDS_LABEL (note, i), 0) == BB_HEAD (bb))
return false;
}
}
free_data_sets (bb); free_data_sets (bb);
......
2012-09-06 Tobias Burnus 2012-09-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/54455
* gcc.dg/54455.c: New test.
2012-09-06 Tobias Burnus <burnus@net-b.de>
PR fortran/54463 PR fortran/54463
* gfortran.dg/promotion_2.f90: New. * gfortran.dg/promotion_2.f90: New.
......
/* PR rtl-optimization/54455 */
/* { dg-do compile } */
/* { dg-options "-O1 -fschedule-insns -fselective-scheduling --param max-sched-extend-regions-iters=2" } */
extern void fn1 (void), fn2 (void);
static inline __attribute__((always_inline)) int
foo (int *x, long y)
{
asm goto ("" : : "r" (x), "r" (y) : "memory" : lab);
return 0;
lab:
return 1;
}
void
bar (int *x)
{
if (foo (x, 23))
fn1 ();
else
fn2 ();
foo (x, 2);
}
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