Commit 57cfa172 by Richard Biener Committed by Richard Biener

graphite-sese-to-poly.c (extract_affine): For casts increasing precision do not…

graphite-sese-to-poly.c (extract_affine): For casts increasing precision do not perform modulo reduction.

2017-10-06  Richard Biener  <rguenther@suse.de>

	* graphite-sese-to-poly.c (extract_affine): For casts increasing
	precision do not perform modulo reduction.

From-SVN: r253474
parent 31bee964
2017-10-06 Richard Biener <rguenther@suse.de>
* graphite-sese-to-poly.c (extract_affine): For casts increasing
precision do not perform modulo reduction.
2017-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/82436
* tree-vect-slp.c (vect_supported_load_permutation_p): More
conservatively choose the vectorization factor when checking
......@@ -299,11 +299,18 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space)
return res;
CASE_CONVERT:
res = extract_affine (s, TREE_OPERAND (e, 0), space);
/* signed values, even if overflow is undefined, get modulo-reduced. */
if (! TYPE_UNSIGNED (type))
res = wrap (res, TYPE_PRECISION (type) - 1);
break;
{
tree itype = TREE_TYPE (TREE_OPERAND (e, 0));
res = extract_affine (s, TREE_OPERAND (e, 0), space);
/* Signed values, even if overflow is undefined, get modulo-reduced.
But only if not all values of the old type fit in the new. */
if (! TYPE_UNSIGNED (type)
&& ((TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (e, 0)))
&& TYPE_PRECISION (type) <= TYPE_PRECISION (itype))
|| TYPE_PRECISION (type) < TYPE_PRECISION (itype)))
res = wrap (res, TYPE_PRECISION (type) - 1);
break;
}
case NON_LVALUE_EXPR:
res = extract_affine (s, TREE_OPERAND (e, 0), space);
......
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