+2018-11-20 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2018-03-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84777
+ * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
+ force-vectorize loops ignore whether we are optimizing for size.
+
+ 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-11-20 Xuepeng Guo <xuepeng.guo@intel.com>
Backport from mainline
&& offset >= s_info->begin
&& offset + width <= s_info->end
&& all_positions_needed_p (s_info, offset - s_info->begin,
- 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-11-20 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 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-11-20 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20181120-1.c: New test.
--- /dev/null
+// { 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;
be true, since quite often it is possible to verify that the condition is
satisfied in the first iteration and therefore to eliminate it. Jump
threading handles these cases now. */
- if (optimize_loop_for_size_p (loop))
+ if (optimize_loop_for_size_p (loop)
+ && !loop->force_vectorize)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,