Ensure float equivalences include + and - zero.
commitb0892b1fc637fadf14d7016858983bc5776a1e69
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 9 Oct 2023 14:15:07 +0000 (9 10:15 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Mon, 9 Oct 2023 16:15:17 +0000 (9 12:15 -0400)
tree521c05bbad3d113c397dd710a2f8ea5fd4124123
parent5ee51119d1345f3f13af784455a4ae466766912b
Ensure float equivalences include + and - zero.

A floating point equivalence may not properly reflect both signs of
zero, so be pessimsitic and ensure both signs are included.

PR tree-optimization/111694
gcc/
* gimple-range-cache.cc (ranger_cache::fill_block_cache): Adjust
equivalence range.
* value-relation.cc (adjust_equivalence_range): New.
* value-relation.h (adjust_equivalence_range): New prototype.

gcc/testsuite/
* gcc.dg/pr111694.c: New.
gcc/gimple-range-cache.cc
gcc/testsuite/gcc.dg/pr111694.c [new file with mode: 0644]
gcc/value-relation.cc
gcc/value-relation.h