+2020-05-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93891
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): Fall back to
+ the original reference tree for assessing access alignment.
+
2020-05-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/39612
and return the found value. */
if (is_gimple_reg_type (TREE_TYPE (lhs))
&& types_compatible_p (TREE_TYPE (lhs), vr->type)
- && ref->ref)
+ && (ref->ref || data->orig_ref.ref))
{
tree *saved_last_vuse_ptr = data->last_vuse_ptr;
/* Do not update last_vuse_ptr in vn_reference_lookup_2. */
-fno-strict-aliasing. So simply resort to alignment to
rule out overlaps. Do this check last because it is
quite expensive compared to the hash-lookup above. */
- && multiple_p (get_object_alignment (ref->ref), ref->size)
+ && multiple_p (get_object_alignment
+ (ref->ref ? ref->ref : data->orig_ref.ref),
+ ref->size)
&& multiple_p (get_object_alignment (lhs), ref->size))
return res;
}