[PATCH] D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 08:05:06 PDT 2019
cameron.mcinally added a comment.
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?
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