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

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 10:01:28 PDT 2019


kpn added a comment.

In D63782#1582778 <https://reviews.llvm.org/D63782#1582778>, @cameron.mcinally wrote:

> In D63782#1579595 <https://reviews.llvm.org/D63782#1579595>, @efriedma wrote:
>
> > > How aggressive is LLVM's UB handling? Would it remove an entire block/function if UB is found in it?
> >
> > If LLVM can prove a basic block unconditionally executes UB, it will be erased. But "unconditionally" is an important qualifier. For example, consider the following function: `void f(void g()) { g(); *(int*)0 = 0; }`.  The call to g isn't erased because we can't prove g will return.
>
>
> The constrained FP intrinsics should be opaque enough (besides 'ignore'), so that sounds fine to me.
>
> Seems like we should let invalid fptoXi's return poison, like the unconstrained versions do. Anyone see a problem with this?


Is there any chance I can get this patch into 9? What do I need to do to make that happen?


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