diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-26 09:26:43 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-26 09:26:43 +0000 |
commit | 4b68df2ea0017389d96520076b495cf928e2b65f (patch) | |
tree | 42859ef3f64d8bc588cdb858f32f1888ba76097d /gcc/ipa-pure-const.c | |
parent | 77364e573c2d74bb177aa5a198cfcbd133dd0f72 (diff) | |
download | gcc-4b68df2ea0017389d96520076b495cf928e2b65f.tar.gz |
2010-07-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45052
* ipa-pure-const.c (check_stmt): Check volatileness.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 1ff15bf22e6..0e07e448295 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -651,6 +651,13 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa) print_gimple_stmt (dump_file, stmt, 0, 0); } + if (gimple_has_volatile_ops (stmt)) + { + local->pure_const_state = IPA_NEITHER; + if (dump_file) + fprintf (dump_file, " Volatile stmt is not const/pure\n"); + } + /* Look for loads and stores. */ walk_stmt_load_store_ops (stmt, local, ipa ? check_ipa_load : check_load, |