Commit 8fec4d22 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/83682 (ICE in simplify_subreg, at simplify-rtx.c:6296)

	PR rtl-optimization/83682
	* rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
	if it has non-VECTOR_MODE element mode.
	(vec_duplicate_p): Likewise.

	* gcc.target/i386/pr83682.c: New test.

From-SVN: r256308
parent dba9c1fd
2018-01-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83682
* rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
if it has non-VECTOR_MODE element mode.
(vec_duplicate_p): Likewise.
PR middle-end/83694
* cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
......
......@@ -2969,7 +2969,9 @@ const_vec_duplicate_p (T x, T *elt)
*elt = CONST_VECTOR_ENCODED_ELT (x, 0);
return true;
}
if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == VEC_DUPLICATE)
if (GET_CODE (x) == CONST
&& GET_CODE (XEXP (x, 0)) == VEC_DUPLICATE
&& !VECTOR_MODE_P (GET_MODE (XEXP (XEXP (x, 0), 0))))
{
*elt = XEXP (XEXP (x, 0), 0);
return true;
......@@ -2984,7 +2986,8 @@ template <typename T>
inline bool
vec_duplicate_p (T x, T *elt)
{
if (GET_CODE (x) == VEC_DUPLICATE)
if (GET_CODE (x) == VEC_DUPLICATE
&& !VECTOR_MODE_P (GET_MODE (XEXP (x, 0))))
{
*elt = XEXP (x, 0);
return true;
......
2018-01-06 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83682
* gcc.target/i386/pr83682.c: New test.
2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/78534
......
/* PR rtl-optimization/83682 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */
typedef float V __attribute__((__vector_size__(16)));
typedef double W __attribute__((__vector_size__(16)));
V b;
W c;
void
foo (void *p)
{
V e = __builtin_ia32_cvtsd2ss (b, c);
V g = e;
float f = g[0];
__builtin_memcpy (p, &f, sizeof (f));
}
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