cse.c (exp_equiv_p): For GCSE...

* cse.c (exp_equiv_p) <MEM>: For GCSE, return 0 for expressions with
	different trapping status if -fnon-call-exceptions is enabled.

From-SVN: r212879
This commit is contained in:
Eric Botcazou 2014-07-20 21:00:51 +00:00 committed by Eric Botcazou
parent d6cd6e226f
commit e304caa4e5
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
* cse.c (exp_equiv_p) <MEM>: For GCSE, return 0 for expressions with
different trapping status if -fnon-call-exceptions is enabled.
2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
* expr.c (store_field): Handle VOIDmode for calls that return values

View File

@ -2687,6 +2687,13 @@ exp_equiv_p (const_rtx x, const_rtx y, int validate, bool for_gcse)
the same attributes share the same mem_attrs data structure. */
if (MEM_ATTRS (x) != MEM_ATTRS (y))
return 0;
/* If we are handling exceptions, we cannot consider two expressions
with different trapping status as equivalent, because simple_mem
might accept one and reject the other. */
if (cfun->can_throw_non_call_exceptions
&& (MEM_NOTRAP_P (x) != MEM_NOTRAP_P (y)))
return 0;
}
break;