Commit 4e98c66c by Sebastian Pop Committed by Sebastian Pop

re PR tree-optimization/42221 (ICE from '-Os -fgraphite-identity')

Fix PR42221.

2009-12-23  Sebastian Pop  <sebastian.pop@amd.com>

	PR middle-end/42221
	* sese.c (expand_scalar_variables_expr): Follow the SSA links into
	the array indexing of ADDR_EXPRs.

	* testsuite/gcc.dg/graphite/pr42221.c: New.

From-SVN: r155731
parent fd4a56ff
2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42221
* sese.c (expand_scalar_variables_expr): Follow the SSA links into
the array indexing of ADDR_EXPRs.
* testsuite/gcc.dg/graphite/pr42221.c: New.
2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42521
* graphite.c (graphite_finalize): Call scev_reset.
(graphite_transform_loops): Do not call scev_reset between the code
......
......@@ -874,7 +874,20 @@ expand_scalar_variables_expr (tree type, tree op0, enum tree_code code,
return expand_scalar_variables_ssa_name (op0, bb, region, map, gsi);
if (code == ADDR_EXPR)
return op0;
{
tree op00 = TREE_OPERAND (op0, 0);
if (handled_component_p (op00)
&& TREE_CODE (op00) == ARRAY_REF)
{
tree e = expand_scalar_variables_expr (TREE_TYPE (op00), op00,
TREE_CODE (op00),
NULL, bb, region, map, gsi);
return fold_build1 (code, TREE_TYPE (op0), e);
}
return op0;
}
gcc_unreachable ();
return NULL;
......
/* { dg-options "-Os -fgraphite-identity" } */
static void b2w(unsigned int *out, const unsigned char *in, unsigned int len)
{
const unsigned char *bpend = in + len;
for (; in != bpend; in += 4, ++out)
{
*out = (unsigned int) (in[0] ) |
(unsigned int) (in[3] << 24);
}
}
static void md4step(unsigned int state[4], const unsigned char *data)
{
unsigned int A, X[16];
b2w(X, data, 64);
state[0] += A;
}
void md4sum(void)
{
unsigned char final[128];
unsigned int state[4];
md4step(state, final);
md4step(state, final + 64);
}
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