Commit b63fe007 by Uros Bizjak Committed by Uros Bizjak

re PR rtl-optimization/56275 (ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.)

	PR rtl-optimization/56275
	* simplify-rtx.c (avoid_constant_pool_reference): Check that
	offset is non-negative and less than cmode size before
	calling simplify_subreg.

testsuite/ChangeLog:

	PR rtl-optimization/56275
	* gcc.dg/pr56275.c: New test.

From-SVN: r195944
parent ba9146c1
2013-02-11 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/56275
* simplify-rtx.c (avoid_constant_pool_reference): Check that
offset is non-negative and less than cmode size before
calling simplify_subreg.
2013-02-11 Richard Biener <rguenther@suse.de> 2013-02-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/56264 PR tree-optimization/56264
......
...@@ -242,7 +242,8 @@ avoid_constant_pool_reference (rtx x) ...@@ -242,7 +242,8 @@ avoid_constant_pool_reference (rtx x)
/* If we're accessing the constant in a different mode than it was /* If we're accessing the constant in a different mode than it was
originally stored, attempt to fix that up via subreg simplifications. originally stored, attempt to fix that up via subreg simplifications.
If that fails we have no choice but to return the original memory. */ If that fails we have no choice but to return the original memory. */
if (offset != 0 || cmode != GET_MODE (x)) if ((offset != 0 || cmode != GET_MODE (x))
&& offset >= 0 && offset < GET_MODE_SIZE (cmode))
{ {
rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset); rtx tem = simplify_subreg (GET_MODE (x), c, cmode, offset);
if (tem && CONSTANT_P (tem)) if (tem && CONSTANT_P (tem))
......
2013-02-11 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/56275
* gcc.dg/pr56275.c: New test.
2013-02-11 Richard Biener <rguenther@suse.de> 2013-02-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/56273 PR tree-optimization/56273
......
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
void tiger_block_v2 (long long in1, v2tw *res)
{
v2tw i1 = { in1, in1 };
*res = i1 << 1;
}
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