re PR tree-optimization/28839 (ICE in tree-vectorizer.c with -O2 -ftree-vectorize -funswitch-loops)

PR tree-optimization/28839
	* tree-into-ssa.c (prune_unused_phi_nodes): Take into account kills in
	blocks in that phi arguments appear.

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

From-SVN: r116605
This commit is contained in:
Zdenek Dvorak 2006-08-31 21:33:56 +02:00 committed by Zdenek Dvorak
parent 6a10f7b362
commit 1e5787ef86
4 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-08-31 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/28839
* tree-into-ssa.c (prune_unused_phi_nodes): Take into account kills in
blocks in that phi arguments appear.
2006-08-31 Roger Sayle <roger@eyesopen.com>
PR other/22313

View File

@ -1,3 +1,8 @@
2006-08-31 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/28839
* gcc.dg/pr28839.c: New test.
2006-08-31 Andreas Krebbel <krebbel1@de.ibm.com>
PR target/24367

View File

@ -0,0 +1,18 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse2 -ftree-vectorize -funswitch-loops" } */
static int ready[10];
void abort (void);
void test_once (int t,int t1)
{
int i, repeat;
for (i = 0; i < 10; i++)
{
ready[i] = 0;
if (t1)
if (b())
abort ();
}
if (t)
abort ();
}

View File

@ -977,6 +977,13 @@ prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
if (bitmap_bit_p (uses, u))
continue;
/* In case there is a kill directly in the use block, do not record
the use (this is also necessary for correctness, as we assume that
uses dominated by a def directly in their block have been filtered
out before). */
if (bitmap_bit_p (kills, u))
continue;
bitmap_set_bit (uses, u);
VEC_safe_push (int, heap, worklist, u);
}