http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55124
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|vries at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> 2012-11-29 14:35:08 UTC --- To summarize here, the issue is that PRE insertion (and also expression clean and dependent_clean, but not really phi-translation) need to process expression set from leafs (where the dependence tree is formed by the value-ids of the expressions). In ancient times this might have been ensured by sorting expressions after their value-id (sorted_array_from_bitmap_set), but at least with SCCVN there is no such thing as a topological value-id assignment. Thus, the correct fix is indeed to properly sort the expression array according to expression dependencies. Which then allows to get rid of value-ids in SCCVN and compute them lazily in get_expr_value_id. I'll take over from Tom here again.