+2019-07-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91221
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Appropriately
+ restrict partial-def handling of empty constructors and
+ memset to refs with known offset.
+
2019-07-22 Jan Beulich <jbeulich@suse.com>
* config/i386/sse.md (ternlogsuffix): New.
+2019-07-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91221
+ * g++.dg/pr91221.C: New testcase.
+
2019-07-22 Martin Liska <mliska@suse.cz>
PR driver/91172
(vuse, vr->set, vr->type, vr->operands, val);
}
/* For now handle clearing memory with partial defs. */
- else if (integer_zerop (gimple_call_arg (def_stmt, 1))
+ else if (known_eq (ref->size, maxsize)
+ && integer_zerop (gimple_call_arg (def_stmt, 1))
&& tree_to_poly_int64 (len).is_constant (&leni)
&& offset.is_constant (&offseti)
&& offset2.is_constant (&offset2i)
return vn_reference_lookup_or_insert_for_pieces
(vuse, vr->set, vr->type, vr->operands, val);
}
- else if (maxsize.is_constant (&maxsizei)
+ else if (known_eq (ref->size, maxsize)
+ && maxsize.is_constant (&maxsizei)
&& maxsizei % BITS_PER_UNIT == 0
&& offset.is_constant (&offseti)
&& offseti % BITS_PER_UNIT == 0