[PATCH] D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 19:52:17 PDT 2019


cameron.mcinally added a comment.

In D63782#1560136 <https://reviews.llvm.org/D63782#1560136>, @craig.topper wrote:

> In D63782#1560123 <https://reviews.llvm.org/D63782#1560123>, @cameron.mcinally wrote:
>
> > So pragmatically, an invalid exception is an alarm that the code is off track. As long as the exception is handled appropriately (default or an alternative), the result of the invalid operation shouldn't matter. Whatever LLVM wants to do with the value gets no arguments from me, since we've already self-destructed (unless the program handles the exception gracefully, but that wouldn't require a defined result from the invalid operation anyway).
>
>
> But the exception could be masked couldn't it?


Yeah, but I'm not sure if it matters. The program has already failed, so there's no guarantee that the results are useful.

Our typical user enables traps (inv, divz, and ovf) during development to convince themselves that the code is safe. Production runs are then done with traps disabled. But, of course, traps may be reenabled if a runtime problem is later found. They're basically a sanity check.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63782/new/

https://reviews.llvm.org/D63782





More information about the llvm-commits mailing list