cfglayout.c (fixup_reorder_chain): Accept conditional jumps without a fallthrough edge.
2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * cfglayout.c (fixup_reorder_chain): Accept conditional jumps without a fallthrough edge. 2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * gcc.c-torture/compile/20090917-1.c: New testcase. From-SVN: r151790
This commit is contained in:
parent
bbc1e3ba53
commit
10e154dfd7
@ -1,3 +1,8 @@
|
||||
2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* cfglayout.c (fixup_reorder_chain): Accept conditional jumps
|
||||
without a fallthrough edge.
|
||||
|
||||
2009-09-16 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
|
||||
|
@ -787,6 +787,17 @@ fixup_reorder_chain (void)
|
||||
{
|
||||
if (any_condjump_p (bb_end_insn))
|
||||
{
|
||||
/* This might happen if the conditional jump has side
|
||||
effects and could therefore not be optimized away.
|
||||
Make the basic block to end with a barrier in order
|
||||
to prevent rtl_verify_flow_info from complaining. */
|
||||
if (!e_fall)
|
||||
{
|
||||
gcc_assert (!onlyjump_p (bb_end_insn));
|
||||
bb->il.rtl->footer = emit_barrier_after (bb_end_insn);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If the old fallthru is still next, nothing to do. */
|
||||
if (bb->aux == e_fall->dest
|
||||
|| e_fall->dest == EXIT_BLOCK_PTR)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* gcc.c-torture/compile/20090917-1.c: New testcase.
|
||||
|
||||
2009-09-16 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gfortran.dg/default_format_denormal_2.f90: Add ieee options.
|
||||
|
55
gcc/testsuite/gcc.c-torture/compile/20090917-1.c
Normal file
55
gcc/testsuite/gcc.c-torture/compile/20090917-1.c
Normal file
@ -0,0 +1,55 @@
|
||||
typedef int *loop_p;
|
||||
typedef struct VEC_loop_p_base
|
||||
{
|
||||
unsigned num;
|
||||
loop_p vec[1];
|
||||
}
|
||||
VEC_loop_p_base;
|
||||
|
||||
__inline__ int
|
||||
VEC_loop_p_base_iterate (const VEC_loop_p_base * vec_, unsigned ix_,
|
||||
loop_p * ptr)
|
||||
{
|
||||
if (vec_ && ix_ < vec_->num)
|
||||
{
|
||||
*ptr = vec_->vec[ix_];
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct VEC_loop_p_heap
|
||||
{
|
||||
VEC_loop_p_base base;
|
||||
}
|
||||
VEC_loop_p_heap;
|
||||
|
||||
|
||||
static __inline__ int
|
||||
am_vector_index_for_loop (VEC_loop_p_heap * loop_nest, int loop_num)
|
||||
{
|
||||
int i;
|
||||
loop_p l;
|
||||
|
||||
for (i = 0;
|
||||
VEC_loop_p_base_iterate ((loop_nest) ? &(loop_nest)->base : 0, i,
|
||||
&(l)); i++)
|
||||
if (l == loop_num)
|
||||
return i;
|
||||
|
||||
__builtin_unreachable ();
|
||||
}
|
||||
|
||||
unsigned char
|
||||
build_access_matrix (unsigned max)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < max; i++)
|
||||
{
|
||||
if (am_vector_index_for_loop (foo (), 0))
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user