diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-08 13:39:05 -0800 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-09 08:20:33 -0800 |
commit | 6e84a41622f56ca360d995e6092ded3b5a02ba40 (patch) | |
tree | 3854b72ce547df381c9244db0a6a982f11e2757a /gcc/function.cc | |
parent | af1277b4d0d274b8c8f6edffcee32b7f39f2df64 (diff) | |
download | gcc-6e84a41622f56ca360d995e6092ded3b5a02ba40.zip gcc-6e84a41622f56ca360d995e6092ded3b5a02ba40.tar.gz gcc-6e84a41622f56ca360d995e6092ded3b5a02ba40.tar.bz2 |
VN: Don't recurse on for the same value of `a | b` [PR117496]
After adding vn_valueize to the handle the `a | b ==/!= 0` case
of insert_predicates_for_cond, it would go into an infinite loop
as the Value number for either a or b could be the same as what it
is for the whole expression. This avoids that recursion so there is
no infinite loop here.
Bootstrapped and tested on x86_64-linux.
PR tree-optimization/117496
gcc/ChangeLog:
* tree-ssa-sccvn.cc (insert_predicates_for_cond): If the
valueization for the new lhs is the same as the old one,
don't recurse.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr117496-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions