diff options
author | Richard Biener <rguenther@suse.de> | 2016-04-05 08:05:06 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-04-05 08:05:06 +0000 |
commit | 62b233f22449de60755b07c16f16b1a020c0708c (patch) | |
tree | 5465e36f6a83bb77f9fd19e1e28dd9eda86cc48e | |
parent | cc05759d4c26822df221adb12ff6d8a4c28154a9 (diff) | |
download | gcc-62b233f22449de60755b07c16f16b1a020c0708c.zip gcc-62b233f22449de60755b07c16f16b1a020c0708c.tar.gz gcc-62b233f22449de60755b07c16f16b1a020c0708c.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimplify-me.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr70499.C | 39 |
4 files changed, 52 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9ad89c..b97f4ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/gimplify-me.c b/gcc/gimplify-me.c index c80a4ff..28e467b 100644 --- a/gcc/gimplify-me.c +++ b/gcc/gimplify-me.c @@ -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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a701c4..baebdb0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 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, remove XFAIL. diff --git a/gcc/testsuite/g++.dg/torture/pr70499.C b/gcc/testsuite/g++.dg/torture/pr70499.C new file mode 100644 index 0000000..954fea5 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr70499.C @@ -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); +} |