[Bug tree-optimization/70919] [6/7 Regression] wrong code at -O1 on x86_64-linux-gnu in 32-bit mode
jamborm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 12 17:22:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70919
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The problem is that late SRA replaces scalar loads from constant pool
by replacements but fails to add their initializations to the
beginning of the function.
The reason for the omission is that
initialize_constant_pool_replacements only adds those for variables in
should_scalarize_away_bitmap but that bitmap was intended only as a
hint for total scalarization and a variable does not end up there if
only scalars are read from it.
Removing that condition fixes the bug. In fact, even the
cannot_scalarize_away_bitmap seems wrong to me for the very same reason.
More information about the Gcc-bugs
mailing list