tree-optimization/92328 fix value-number with bogus type
We were actually value-numbering two entities with different type
the same rather than just having the same representation in the
hashtable. The following fixes that by wrapping the value in a
to be inserted VIEW_CONVERT_EXPR.
2020-01-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/92328
* tree-ssa-sccvn.c (vn_reference_lookup_3): Preserve
type when value-numbering same-sized store by inserting a
VIEW_CONVERT_EXPR.
(eliminate_dom_walker::eliminate_stmt): When eliminating
a redundant store handle bit-reinterpretation of the same value.
* gcc.dg/torture/pr92328.c: New testcase.