]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/104880 - update-address-taken and cmpxchg
authorRichard Biener <rguenther@suse.de>
Fri, 11 Mar 2022 13:09:33 +0000 (14:09 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 11 Mar 2022 13:12:06 +0000 (14:12 +0100)
commiteb5edcf3f3ae008a1c55c88f08a886a5f350a759
tree02391bd2bb8424173f032ab327e446daf1380aae
parent69619acd8d9b5856f5af6e5323d9c7c4ec9ad08f
tree-optimization/104880 - update-address-taken and cmpxchg

The following addresses optimistic non-addressable marking of
an argument of __atomic_compare_exchange_n which broke when
I added DECL_NOT_GIMPLE_REG_P since we cannot guarantee we can
rewrite it when TREE_ADDRESSABLE is unset.  Instead we have to
restore TREE_ADDRESSABLE in that case.

2022-03-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104880
* tree-ssa.cc (execute_update_address_taken): Remember if we
optimistically made something not addressable and
prepare to undo it.

* g++.dg/opt/pr104880.cc: New testcase.
gcc/testsuite/g++.dg/opt/pr104880.cc [new file with mode: 0644]
gcc/tree-ssa.cc
This page took 0.065292 seconds and 6 git commands to generate.