[PATCH] Fix ipa-pure-const wrt clobbers
Richard Guenther
rguenther@suse.de
Fri Jan 27 14:14:00 GMT 2012
Just noticed the following - oddly no testsuite regressions because
of this ...
Richard.
2012-01-27 Richard Guenther <rguenther@suse.de>
* ipa-pure-const.c (check_stmt): Clobbers do not make a
function non-const/pure.
Index: gcc/ipa-pure-const.c
===================================================================
*** gcc/ipa-pure-const.c (revision 183616)
--- gcc/ipa-pure-const.c (working copy)
*************** check_stmt (gimple_stmt_iterator *gsip,
*** 652,658 ****
print_gimple_stmt (dump_file, stmt, 0, 0);
}
! if (gimple_has_volatile_ops (stmt))
{
local->pure_const_state = IPA_NEITHER;
if (dump_file)
--- 652,659 ----
print_gimple_stmt (dump_file, stmt, 0, 0);
}
! if (gimple_has_volatile_ops (stmt)
! && !gimple_clobber_p (stmt))
{
local->pure_const_state = IPA_NEITHER;
if (dump_file)
More information about the Gcc-patches
mailing list