+2010-07-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44784
+ * tree-ssa-pre.c (bitmap_find_leader): Fix dominance check
+ for inserted stmts.
+ (find_or_generate_expression): Fix SCCVN insertion check.
+
2010-07-05 Nathan Sidwell <nathan@codesourcery.com>
* config/rs6000/e500crtsavg64gprctr.asm: Correct done label name.
+2010-07-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44784
+ * gcc.c-torture/compile/pr44784.c: New testcase.
+
2010-07-05 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c:
--- /dev/null
+typedef struct rtx_def *rtx;
+enum rtx_code { SUBREG };
+typedef union rtunion_def {
+ long rtint;
+ unsigned long rtuint;
+ rtx rtx;
+} rtunion;
+struct rtx_def {
+ enum rtx_code code: 8;
+ rtunion fld[1];
+};
+typedef struct simple_bitmap_def {
+ unsigned long long elms[1];
+} *sbitmap;
+struct df_link {
+ struct df_link *next;
+ rtx reg;
+};
+typedef enum { UNDEFINED, CONSTANT, VARYING } latticevalue;
+typedef struct {
+ latticevalue lattice_val;
+} value;
+static value *values;
+static sbitmap ssa_edges;
+void defs_to_varying (struct df_link *start)
+{
+ struct df_link *currdef;
+ for (currdef = start;
+ currdef;
+ currdef = currdef->next)
+ {
+ rtx reg = currdef->reg;
+ if (values[(reg->code == SUBREG
+ ? reg->fld[0].rtx
+ : reg)->fld[0].rtuint].lattice_val != VARYING)
+ ssa_edges->elms [(reg->code == SUBREG
+ ? reg->fld[0].rtx
+ : reg)->fld[0].rtuint / 64]
+ |= ((unsigned long long) 1
+ << (reg->code == SUBREG
+ ? reg->fld[0].rtx
+ : reg)->fld[0].rtuint % 64);
+ values[(reg->code == SUBREG
+ ? reg->fld[0].rtx
+ : reg)->fld[0].rtuint].lattice_val = VARYING;
+ }
+}
gimple def_stmt = SSA_NAME_DEF_STMT (PRE_EXPR_NAME (val));
if (gimple_code (def_stmt) != GIMPLE_PHI
&& gimple_bb (def_stmt) == gimple_bb (stmt)
- && gimple_uid (def_stmt) >= gimple_uid (stmt))
+ /* PRE insertions are at the end of the basic-block
+ and have UID 0. */
+ && (gimple_uid (def_stmt) == 0
+ || gimple_uid (def_stmt) >= gimple_uid (stmt)))
continue;
}
return val;
}
/* If it's still NULL, it must be a complex expression, so generate
- it recursively. Not so for FRE though. */
+ it recursively. Not so if inserting expressions for values generated
+ by SCCVN. */
if (genop == NULL
- && !in_fre)
+ && !domstmt)
{
bitmap_set_t exprset;
unsigned int lookfor = get_expr_value_id (expr);