This is the mail archive of the 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 <> 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

for  gcc/ChangeLog
from  Alexandre Oliva  <>

	* 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
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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