diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2022-12-16 16:53:31 -0500 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2022-12-20 09:15:23 -0500 |
commit | 0bdd2261c254f08b0f4437c156b79711d68c6e7f (patch) | |
tree | 44d559b9833295b7b2c2eb709e309644a1f82144 /gcc/tree.cc | |
parent | 05b7cf52e1b640271900894a894da2d27ef90092 (diff) | |
download | gcc-0bdd2261c254f08b0f4437c156b79711d68c6e7f.zip gcc-0bdd2261c254f08b0f4437c156b79711d68c6e7f.tar.gz gcc-0bdd2261c254f08b0f4437c156b79711d68c6e7f.tar.bz2 |
Don't use PHI equivalences in range-on-entry.
If there is only one argument to a PHI which is defined, an equivalency is
created between the def and the argument. It is safe to consider the def
equal to the argument, but it is dangerous to assume the argument is also
equivalent to the def as there may be branches which change the range on the
path to the PHI on that argument
This patch avoid using that relation in range-on-entry calculations.
PR tree-optimization/108139
gcc/
* gimple-range-cache.cc (ranger_cache::fill_block_cache): Do not
use equivalences originating from PHIS.
gcc/testsuite/
* gcc.dg/pr108139.c: New.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions