https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122380
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #15)
> -fno-tree-pre also works.
> PRE actually has not changed the
> MEM[(struct _Vector_impl_data *)m_3(D) + 8B]._M_start = 0B;
> MEM[(struct _Vector_impl_data *)m_3(D) + 8B]._M_finish = 0B;
> MEM[(struct _Vector_impl_data *)m_3(D) + 8B]._M_end_of_storage = 0B;
> stores, but merged the reads which were separate based on _M_index, for 0
> (aka A)
> _33 = MEM[(struct _Vector_base *)m_3(D) +
> 8B]._M_impl.D.36905._M_end_of_storage;
> _34 = MEM[(struct _Vector_base *)m_3(D) + 8B]._M_impl.D.36905._M_start;
> and for 1 (aka B)
> _39 = MEM[(struct _Vector_base *)m_3(D) +
> 8B]._M_impl.D.38000._M_end_of_storage;
> _40 = MEM[(struct _Vector_base *)m_3(D) + 8B]._M_impl.D.38000._M_start;
> into
> pretmp_62 = MEM[(struct _Vector_base *)m_3(D) +
> 8B]._M_impl.D.38000._M_end_of_storage;
> pretmp_48 = MEM[(struct _Vector_base *)m_3(D) +
> 8B]._M_impl.D.38000._M_start;
> plus kept the _39/_40 as is. So, I think aliasing-wise it used to read once
> from std::vector<double> elts and once from std::vector<int> and now it
> reads in both cases using the same.
This seems to be one of the cases where the use of a VN lookup in compute_avail
brings us the PRE representation for the "original" ref from another same
value-numbered read. That is, it's the half-way conversion of properly
tracking PRE expressions, away from using the expressions from the VN
table.
We're tryig to work around this in the blob
/* If the load was value-numbered to another
load make sure we do not use its expression
for insertion if it wouldn't be a valid
replacement. */
...
ISTR trying to fix this multiple times. I'll try again ...