Commit bb81a576 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/82386 (internal compiler error: Segmentation fault on 32-bit powerpc BE targets)

	PR target/82386
	* combine.c (combine_instructions): Don't combine in unreachable
	basic blocks.

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

From-SVN: r253378
parent 8398c1df
2017-10-03 Jakub Jelinek <jakub@redhat.com>
PR target/82386
* combine.c (combine_instructions): Don't combine in unreachable
basic blocks.
2017-08-18 Peter Bergner <bergner@vnet.ibm.com>
PR target/80210
......@@ -1232,6 +1232,12 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
FOR_EACH_BB_FN (this_basic_block, cfun)
{
rtx_insn *last_combined_insn = NULL;
/* Ignore instruction combination in basic blocks that are going to
be removed as unreachable anyway. See PR82386. */
if (EDGE_COUNT (this_basic_block->preds) == 0)
continue;
optimize_this_for_speed_p = optimize_bb_for_speed_p (this_basic_block);
last_call_luid = 0;
mem_last_set = -1;
......
2017-10-03 Jakub Jelinek <jakub@redhat.com>
PR target/82386
* gcc.dg/pr82386.c: New test.
2017-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70570
......
/* PR target/82386 */
/* { dg-do compile } */
/* { dg-options "-O2 -w" } */
/* { dg-additional-options "-misel" { target powerpc*-*-* } } */
long long int fs;
int vm;
void
sd (void)
{
fs = 1;
vm = 2;
goto zf;
if (0)
{
int y6 = 0;
int *uu = &y6;
short int he;
int of = 0;
zf:
for (;;)
{
he = of;
if (he || (fs |= vm))
{
*uu = fs;
fs += vm;
}
if (y6 == vm)
fs |= he;
he = y6 || fs;
fs /= 0;
}
}
}
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