+2017-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/82387
+ PR tree-optimization/82388
+ PR tree-optimization/82389
+ * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
+ instead of live_bytes non-NULL.
+
2017-10-02 Georg-Johann Lay <avr@gjlay.de>
PR target/41076
+2017-10-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/82387
+ PR tree-optimization/82388
+ PR tree-optimization/82389
+ * gcc.c-torture/compile/pr82389.c: New test.
+ * gcc.c-torture/execute/pr82387.c: New test.
+ * gcc.c-torture/execute/pr82388.c: New test.
+
2017-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/79180
--- /dev/null
+/* PR tree-optimization/82387 */
+
+struct A { int b; };
+int f = 1;
+
+struct A
+foo (void)
+{
+ struct A h[] = {
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1},
+ };
+ return h[24];
+}
+
+int
+main ()
+{
+ struct A i = foo (), j = i;
+ j.b && (f = 0);
+ return f;
+}
/* If the statement is a use the store is not dead. */
else if (ref_maybe_used_by_stmt_p (use_stmt, ref))
{
- /* Handle common cases where we can easily build a ao_ref
+ /* Handle common cases where we can easily build an ao_ref
structure for USE_STMT and in doing so we find that the
references hit non-live bytes and thus can be ignored. */
- if (live_bytes && (!gimple_vdef (use_stmt) || !temp))
+ if (byte_tracking_enabled && (!gimple_vdef (use_stmt) || !temp))
{
if (is_gimple_assign (use_stmt))
{