Commit 2b568899 by Richard Biener Committed by Richard Biener

re PR target/77833 (ICE: in plus_constant, at explow.c:87 with -O -mavx512f)

2016-10-04  Richard Biener  <rguenther@suse.de>

	PR middle-end/77833
	* explow.c (plus_constant): Verify the mode of the constant
	pool offset before calling plus_constant.

	* gcc.target/i386/pr77833.c: New testcase.

From-SVN: r240743
parent d96a5585
2016-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/77833
* explow.c (plus_constant): Verify the mode of the constant
pool offset before calling plus_constant.
2016-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/77407
* match.pd (X / abs (X) -> X < 0 ? -1 : 1): Drop vector
type support, mark with :C.
......
......@@ -114,12 +114,15 @@ plus_constant (machine_mode mode, rtx x, HOST_WIDE_INT c,
cst = gen_lowpart (mode, cst);
gcc_assert (cst);
}
tem = plus_constant (mode, cst, c);
tem = force_const_mem (GET_MODE (x), tem);
/* Targets may disallow some constants in the constant pool, thus
force_const_mem may return NULL_RTX. */
if (tem && memory_address_p (GET_MODE (tem), XEXP (tem, 0)))
return tem;
if (GET_MODE (cst) == VOIDmode || GET_MODE (cst) == mode)
{
tem = plus_constant (mode, cst, c);
tem = force_const_mem (GET_MODE (x), tem);
/* Targets may disallow some constants in the constant pool, thus
force_const_mem may return NULL_RTX. */
if (tem && memory_address_p (GET_MODE (tem), XEXP (tem, 0)))
return tem;
}
}
break;
......
2016-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/77833
* gcc.target/i386/pr77833.c: New testcase.
2016-09-26 Jeff Law <law@redhat.com>
PR tree-optimization/71550
......
/* { dg-do compile } */
/* { dg-options "-O -mavx512f" } */
typedef unsigned long V __attribute__((vector_size(64)));
typedef unsigned __int128 W __attribute__((vector_size(64)));
V
foo(int i, V v)
{
i *= ((W)(V){0, 0, 0, 0, 0, 1, v[0]})[2];
v[i] = 0;
i--;
return v + i;
}
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