public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR80359
@ 2017-04-12 13:34 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2017-04-12 13:34 UTC (permalink / raw)
  To: gcc-patches; +Cc: law


I am testing the follow^W^W^WJeff has tested the following,
applied to trunk.

Richard.

2017-04-12  Richard Biener  <rguenther@suse.de>
	Jeff Law  <law@redhat.com>

	PR tree-optimization/80359
	* tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
	trim stores to TARGET_MEM_REFs.

	* gcc.dg/torture/pr80359.c: New testcase.

Index: gcc/tree-ssa-dse.c
===================================================================
*** gcc/tree-ssa-dse.c	(revision 246871)
--- gcc/tree-ssa-dse.c	(working copy)
*************** maybe_trim_memstar_call (ao_ref *ref, sb
*** 451,457 ****
  static void
  maybe_trim_partially_dead_store (ao_ref *ref, sbitmap live, gimple *stmt)
  {
!   if (is_gimple_assign (stmt))
      {
        switch (gimple_assign_rhs_code (stmt))
  	{
--- 451,458 ----
  static void
  maybe_trim_partially_dead_store (ao_ref *ref, sbitmap live, gimple *stmt)
  {
!   if (is_gimple_assign (stmt)
!       && TREE_CODE (gimple_assign_lhs (stmt)) != TARGET_MEM_REF)
      {
        switch (gimple_assign_rhs_code (stmt))
  	{
Index: gcc/testsuite/gcc.dg/torture/pr80359.c
===================================================================
*** gcc/testsuite/gcc.dg/torture/pr80359.c	(nonexistent)
--- gcc/testsuite/gcc.dg/torture/pr80359.c	(working copy)
***************
*** 0 ****
--- 1,12 ----
+ /* { dg-do compile } */
+ 
+ void FFT(_Complex *X, int length)
+ {
+   unsigned i, j;
+   for (; i < length; i++)
+     {
+       X[i] = 0;
+       for (j = 0; j < length; j++)
+ 	X[i] = X[i] / length;
+     }
+ }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-12 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 13:34 [PATCH] Fix PR80359 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).