re PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266)

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

	PR middle-end/70499
	* gimplify-me.c (gimple_regimplify_operands): Do not rewrite
	non-register type temporaries into SSA.

	* g++.dg/torture/pr70499.C: New testcase.

From-SVN: r234738
This commit is contained in:
Richard Biener 2016-04-05 08:05:06 +00:00 committed by Richard Biener
parent cc05759d4c
commit 62b233f224
4 changed files with 52 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-04-05 Richard Biener <rguenther@suse.de>
PR middle-end/70499
* gimplify-me.c (gimple_regimplify_operands): Do not rewrite
non-register type temporaries into SSA.
2016-04-04 Jan Hubicka <hubicka@ucw.cz>
PR ipa/66223

View File

@ -299,7 +299,8 @@ gimple_regimplify_operands (gimple *stmt, gimple_stmt_iterator *gsi_p)
if (need_temp)
{
tree temp = create_tmp_reg (TREE_TYPE (lhs));
if (gimple_in_ssa_p (cfun))
if (gimple_in_ssa_p (cfun)
&& is_gimple_reg_type (TREE_TYPE (lhs)))
temp = make_ssa_name (temp);
gimple_set_lhs (stmt, temp);
post_stmt = gimple_build_assign (lhs, temp);

View File

@ -1,3 +1,8 @@
2016-04-05 Richard Biener <rguenther@suse.de>
PR middle-end/70499
* g++.dg/torture/pr70499.C: New testcase.
2016-04-05 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/20030814-6.c: Fix testcase, disable FRE,

View File

@ -0,0 +1,39 @@
// { dg-do compile }
// { dg-additional-options "-w -Wno-psabi" }
// { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } }
typedef double __m256d __attribute__ ((__vector_size__ (32), __may_alias__));
struct SIMD {
__m256d data;
SIMD() {};
SIMD (double val) { }
SIMD(__m256d _data) { data = _data; }
SIMD operator* (SIMD a) { return a; }
};
struct Foo {
SIMD val;
SIMD dval[2];
__attribute__((__always_inline__)) SIMD & Value() throw() { return val; }
__attribute__((__always_inline__)) Foo operator* ( const Foo & y) throw()
{
Foo res;
SIMD hx;
SIMD hy;
res.Value() = hx*hy;
res.dval[0] = hx*hy;
return res;
}
};
template<typename Tx>
__attribute__((__always_inline__)) inline void inlineFunc(Tx hx[]) {
Tx x = hx[0], y = hx[1];
Tx lam[1] = (x*y);
}
void FooBarFunc () {
Foo adp[2];
inlineFunc (adp);
}