diff options
author | Richard Biener <rguenther@suse.de> | 2024-09-27 13:50:31 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-09-30 07:41:04 +0200 |
commit | 85f5d0642184b68b38bf3daee5a1d04b753850b1 (patch) | |
tree | 20460d698b7ce3c5662c728ff3cf5ceea2075c06 | |
parent | 64163657ba7e70347087a63bb2b32d83b52ea7d9 (diff) | |
download | gcc-85f5d0642184b68b38bf3daee5a1d04b753850b1.zip gcc-85f5d0642184b68b38bf3daee5a1d04b753850b1.tar.gz gcc-85f5d0642184b68b38bf3daee5a1d04b753850b1.tar.bz2 |
tree-optimization/116785 - relax volatile handling in PTA
When there's volatile qualified stores we do not have to treat the
destination as pointing to ANYTHING. It's only when reading from
it that we want to treat the resulting pointers as pointing to ANYTHING.
PR tree-optimization/116785
* tree-ssa-structalias.cc (get_constraint_for_1): Only
volatile qualified reads produce ANYTHING.
-rw-r--r-- | gcc/tree-ssa-structalias.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index d6a53f8..54c4818 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -3646,7 +3646,7 @@ get_constraint_for_1 (tree t, vec<ce_s> *results, bool address_p, } case tcc_reference: { - if (TREE_THIS_VOLATILE (t)) + if (!lhs_p && TREE_THIS_VOLATILE (t)) /* Fall back to anything. */ break; @@ -3751,7 +3751,7 @@ get_constraint_for_1 (tree t, vec<ce_s> *results, bool address_p, } case tcc_declaration: { - if (VAR_P (t) && TREE_THIS_VOLATILE (t)) + if (!lhs_p && VAR_P (t) && TREE_THIS_VOLATILE (t)) /* Fall back to anything. */ break; get_constraint_for_ssa_var (t, results, address_p); |