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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155731
138bc75d-0d04-0410-961f-
82ee72b054a4
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
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;
--- /dev/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);
+}