Commit d7e1f499 by Richard Biener Committed by Richard Biener

re PR rtl-optimization/84003 (FAIL: g++.dg/torture/pr77745.C with noinline foo)

2018-01-26  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/84003
	* dse.c (record_store): Only record redundant stores when
	the earlier store aliases at least all accesses the later one does.

	* g++.dg/torture/pr77745.C: Mark foo noinline to trigger
	latent bug in DSE if NOINLINE is appropriately defined.
	* g++.dg/torture/pr77745-2.C: New testcase including pr77745.C
	and defining NOINLINE.

From-SVN: r257091
parent da1f8d7f
2018-01-26 Richard Biener <rguenther@suse.de>
PR rtl-optimization/84003
* dse.c (record_store): Only record redundant stores when
the earlier store aliases at least all accesses the later one does.
2018-01-26 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83985
......
......@@ -1532,7 +1532,12 @@ record_store (rtx body, bb_info_t bb_info)
&& known_subrange_p (offset, width,
s_info->offset, s_info->width)
&& all_positions_needed_p (s_info, offset - s_info->offset,
width))
width)
/* We can only remove the later store if the earlier aliases
at least all accesses the later one. */
&& (MEM_ALIAS_SET (mem) == MEM_ALIAS_SET (s_info->mem)
|| alias_set_subset_of (MEM_ALIAS_SET (mem),
MEM_ALIAS_SET (s_info->mem))))
{
if (GET_MODE (mem) == BLKmode)
{
......
2018-01-26 Richard Biener <rguenther@suse.de>
PR rtl-optimization/84003
* g++.dg/torture/pr77745.C: Mark foo noinline to trigger
latent bug in DSE if NOINLINE is appropriately defined.
* g++.dg/torture/pr77745-2.C: New testcase including pr77745.C
and defining NOINLINE.
2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/advsimd-intrinsics/vld1x2.c: Make float64
......
// { dg-do run }
#define NOINLINE __attribute__((noinline))
#include "pr77745.C"
// { dg-do run }
#ifndef NOINLINE
#define NOINLINE /* */
#endif
inline void* operator new(__SIZE_TYPE__, void* __p) noexcept { return __p; }
long foo(char *c1, char *c2)
long NOINLINE foo(char *c1, char *c2)
{
long *p1 = new (c1) long;
*p1 = 100;
......
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