This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SRA bit-field optimization


On Oct  3, 2007, Eric Botcazou <ebotcazou@adacore.com> wrote:

> It apparently still misbehaves in some cases for Ada and has introduced an 
> ACATS regression at -O2 on x86-64 (c37213b):

> The correctness problem is that the last statement of BB 4 is not 
> tree_could_throw_p anymore, yielding:

Ugh, there was a thinko in the test for whether the original BB/stmt
could throw.  Thanks for the testcase, this patch fixes it.  I haven't
bootstrapped it yet, I'm on the road with a little computing
horsepower and limited network connection.  I should be back home
tonight.

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree-sra.c (scalarize_lsdt): Fix thinko in testing whether
	the original stmt can throw.

Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c.orig	2007-10-03 13:52:42.000000000 -0300
+++ gcc/tree-sra.c	2007-10-04 15:20:11.000000000 -0300
@@ -3431,7 +3431,7 @@ scalarize_ldst (struct sra_elt *elt, tre
 	{
 	  tree_stmt_iterator tsi;
 	  tree first, blist = NULL;
-	  bool thr = (bsi->bb->flags & EDGE_COMPLEX) != 0;
+	  bool thr = tree_could_throw_p (stmt);
 
 	  /* If the last statement of this BB created an EH edge
 	     before scalarization, we have to locate the first
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]