]> git.ipfire.org Git - people/ms/gcc.git/commit
tree-optimization/108821 - store motion and volatiles
authorRichard Biener <rguenther@suse.de>
Fri, 17 Feb 2023 11:36:44 +0000 (12:36 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 15 Mar 2023 09:10:44 +0000 (10:10 +0100)
commitdbbbaed64f39aae57f5f167174121c1be9d18282
treed67d5b2c3fbf9aa2374a5f96f00e07979b292cd9
parent02ff8c8ebcb7f9b0885946d17ff12523e7522b71
tree-optimization/108821 - store motion and volatiles

The following fixes store motion to not re-issue volatile stores
to preserve TBAA behavior since that will result in the number
of volatile accesses changing.

PR tree-optimization/108821
* tree-ssa-loop-im.cc (sm_seq_valid_bb): We can also not
move volatile accesses.

* gcc.dg/tree-ssa/ssa-lim-24.c: New testcase.

(cherry picked from commit 4c4f0f7acd6b96ee744ef598cbea5c7046a33654)
gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-24.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.cc