Commit 59dc4898 by Kazu Hirata Committed by Kazu Hirata

re PR tree-optimization/38997 (-ftree-loop-distribution ICEs)

gcc/
	PR tree-optimization/38997
	* tree-loop-distribution.c (generate_memset_zero): Use
	POINTER_PLUS_EXPR for a pointer addition.

gcc/testsuite/
	PR tree-optimization/38997
	* gcc.dg/tree-ssa/pr38997.c: New.

From-SVN: r143739
parent 07da44ab
2009-01-28 Kazu Hirata <kazu@codesourcery.com>
PR tree-optimization/38997
* tree-loop-distribution.c (generate_memset_zero): Use
POINTER_PLUS_EXPR for a pointer addition.
2009-01-28 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md (bswap<mode>2): New pattern added.
......
2009-01-28 Kazu Hirata <kazu@codesourcery.com>
PR tree-optimization/38997
* gcc.dg/tree-ssa/pr38997.c: New.
2009-01-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38926
......
......@@ -256,10 +256,15 @@ generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
/* Test for a positive stride, iterating over every element. */
if (integer_zerop (fold_build2 (MINUS_EXPR, integer_type_node, DR_STEP (dr),
TYPE_SIZE_UNIT (TREE_TYPE (op0)))))
addr_base = fold_build2 (PLUS_EXPR, TREE_TYPE (DR_BASE_ADDRESS (dr)),
DR_BASE_ADDRESS (dr),
size_binop (PLUS_EXPR,
DR_OFFSET (dr), DR_INIT (dr)));
{
tree offset = fold_convert (sizetype,
size_binop (PLUS_EXPR,
DR_OFFSET (dr),
DR_INIT (dr)));
addr_base = fold_build2 (POINTER_PLUS_EXPR,
TREE_TYPE (DR_BASE_ADDRESS (dr)),
DR_BASE_ADDRESS (dr), offset);
}
/* Test for a negative stride, iterating over every element. */
else if (integer_zerop (fold_build2 (PLUS_EXPR, integer_type_node,
......
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