https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92747

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 2 Dec 2019, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92747
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jakub at gcc dot gnu.org
> 
> --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> The generic builtins don't care about -fnon-call-exceptions though (e.g. sin 
> is
> nothrow even with -fnon-call-exceptions), so for the start we might just use
> nothrow/leaf for all x86 backend builtins for start.  Though, eventually say
> builtins that store something into memory (or load from memory) or might be
> trapping should probably not be nothrow, though -fnon-call-exceptions is
> Optimization flag and thus can differ between functions, so e.g. deciding 
> based
> on the global flag_non_call_exceptions during construction of the builtin is
> problematic.

One trick would be to keep the default conservative and in
ix86_gimple_fold_builtin adjust the behavior per call via
gimple_call_set_nothrow.  That would happen in the gimple lowering
pass (before EH/CFG build).

Reply via email to