diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2005-04-27 16:28:11 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2005-04-27 14:28:11 +0000 |
commit | e3cc72542ba605f704f9590ef6d5b91bd9b66233 (patch) | |
tree | 7b5703669accc8a1d8d9b4c22799fb59b1af5cfe /gcc/tree-ssa-loop-ivopts.c | |
parent | c4336539b95d8ec3ff5b25d72eee0c4f47c4edd7 (diff) | |
download | gcc-e3cc72542ba605f704f9590ef6d5b91bd9b66233.zip gcc-e3cc72542ba605f704f9590ef6d5b91bd9b66233.tar.gz gcc-e3cc72542ba605f704f9590ef6d5b91bd9b66233.tar.bz2 |
re PR tree-optimization/21171 (IV OPTS removes does not create a new VOPs for constant values)
PR tree-optimization/21171
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Do not
record address uses if the reference is volatile.
* gcc.dg/tree-ssa/pr21171.c: New test.
From-SVN: r98828
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index a62c1cd..f23e8d6 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1518,6 +1518,11 @@ find_interesting_uses_address (struct ivopts_data *data, tree stmt, tree *op_p) struct iv *civ; struct ifs_ivopts_data ifs_ivopts_data; + /* Do not play with volatile memory references. A bit too conservative, + perhaps, but safe. */ + if (stmt_ann (stmt)->has_volatile_ops) + goto fail; + /* Ignore bitfields for now. Not really something terribly complicated to handle. TODO. */ if (TREE_CODE (base) == COMPONENT_REF |