+2016-04-04 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/70484
+ * rtl.h (canon_output_dependence): Declare.
+ * alias.c (canon_output_dependence): New function.
+ * dse.c (record_store): Use canon_output_dependence rather
+ than canon_true_dependence.
+
2016-03-30 Jan Hubicka <hubicka@ucw.cz>
PR ipa/68881
/*mem_canonicalized=*/false,
/*x_canonicalized*/false, /*writep=*/true);
}
+
+/* Likewise, but we already have a canonicalized MEM, and X_ADDR for X.
+ Also, consider X in X_MODE (which might be from an enclosing
+ STRICT_LOW_PART / ZERO_EXTRACT).
+ If MEM_CANONICALIZED is true, MEM is canonicalized. */
+
+int
+canon_output_dependence (const_rtx mem, bool mem_canonicalized,
+ const_rtx x, machine_mode x_mode, rtx x_addr)
+{
+ return write_dependence_p (mem, x, x_mode, x_addr,
+ mem_canonicalized, /*x_canonicalized=*/true,
+ /*writep=*/true);
+}
\f
the value of store_info. If it is, set the rhs to NULL to
keep it from being used to remove a load. */
{
- if (canon_true_dependence (s_info->mem,
- GET_MODE (s_info->mem),
- s_info->mem_addr,
- mem, mem_addr))
+ if (canon_output_dependence (s_info->mem, true,
+ mem, GET_MODE (mem),
+ mem_addr))
{
s_info->rhs = NULL;
s_info->const_rhs = NULL;
extern int canon_anti_dependence (const_rtx, bool,
const_rtx, machine_mode, rtx);
extern int output_dependence (const_rtx, const_rtx);
+extern int canon_output_dependence (const_rtx, bool,
+ const_rtx, machine_mode, rtx);
extern int may_alias_p (const_rtx, const_rtx);
extern void init_alias_target (void);
extern void init_alias_analysis (void);
+2016-04-04 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/70484
+ * gcc.dg/torture/pr70484.c: New testcase.
+
2016-04-04 Marek Polacek <polacek@redhat.com>
PR c/70307
--- /dev/null
+/* { dg-do run } */
+
+extern void abort (void);
+
+int __attribute__((noinline,noclone))
+f(int *pi, long *pl)
+{
+ *pi = 1;
+ *pl = 0;
+ return *(char *)pi;
+}
+
+int main()
+{
+ union { long l; int i; } a;
+ if (f (&a.i, &a.l) != 0)
+ abort ();
+ return 0;
+}