[cfe-dev] [llvm-dev] Intrinsic llvm::isnan

Arthur O'Dwyer via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 23 14:36:48 PDT 2021


On Mon, Aug 23, 2021 at 3:42 PM Sanjay Patel via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Ok, does this edit to the LangRef make sense for the definition of
> "ignore":
> "optimization passes may assume that the exception status flags will not
> be read and that floating-point exceptions **will** be masked" -->
> "optimization passes may assume that the exception status flags will not
> be read and that floating-point exceptions **may** be masked"
>

I haven't been following the technical details, but in terms of the English
documentation, it makes no sense to say that someone "may assume that [X]
*may* happen." Either [X] always happens, in which case optimization passes
may safely assume that it happens; or [X] never happens, in which case
optimization passes may safely assume that it does not happen; or else [X]
sometimes happens and sometimes doesn't, in which case optimizations
passes *must
not assume anything* about [X].

So you might say: "optimization passes may assume that the exception status
flags will not be read. Floating-point exceptions might or might not be
masked, depending on [____]" (and then mention the relevant variable, such
as "instruction set" or "optimization level" or whatever).

HTH,
Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210823/2426dbf4/attachment.html>


More information about the cfe-dev mailing list