]> git.ipfire.org Git - thirdparty/gcc.git/commit
Read global value/mask in IPA.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 14 Jul 2023 10:38:16 +0000 (12:38 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 3 Aug 2023 20:31:34 +0000 (22:31 +0200)
commitc83528d2367b353156e27af50b63d1c14686f778
tree189eaac1a44dfc92473531fa959f417b50517c44
parent9e3fd332959930efd3cabf222afbac910507d2f3
Read global value/mask in IPA.

Instead of reading the known zero bits in IPA, read the value/mask
pair which is available.

There is a slight change of behavior here.  I have removed the check
for SSA_NAME, as the ranger can calculate the range and value/mask for
INTEGER_CST.  This simplifies the code a bit, since there's no special
casing when setting the jfunc bits.  The default range for VR is
undefined, so I think it's safe just to check for undefined_p().

gcc/ChangeLog:

* ipa-prop.cc (ipa_compute_jump_functions_for_edge): Read global
value/mask.

gcc/testsuite/ChangeLog:

* g++.dg/ipa/pure-const-3.C: Move source to...
* g++.dg/ipa/pure-const-3.h: ...here, and adjust original test
accordingly.
* g++.dg/ipa/pure-const-3b.C: New.
gcc/ipa-prop.cc
gcc/testsuite/g++.dg/ipa/pure-const-3.C
gcc/testsuite/g++.dg/ipa/pure-const-3.h [new file with mode: 0644]
gcc/testsuite/g++.dg/ipa/pure-const-3b.C [new file with mode: 0644]