On 02/13/15 12:52, Jakub Jelinek wrote:
Hi!
When moving assignment out of a conditional block before the condition, we
need to either reset or update SSA_NAME_RANGE_INFO, otherwise it might be
wrong, because when computed earlier, it could take into account that in
the conditional block the condition is or is not true.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
2015-02-13 Jakub Jelinek <ja...@redhat.com>
PR tree-optimization/65053
* tree-ssa-phiopt.c (value_replacement): When moving assign before
cond, either reset VR on lhs or set it to phi result VR.
* gcc.c-torture/execute/pr65053-1.c: New test.
* gcc.c-torture/execute/pr65053-2.c: New test.
OK.
I wouldn't be terribly surprised if we have a variety of these kind of
bugs lurking. Basically everything which moves statements like this
potentially needs updating.
jeff