[PATCH] D43142: Experimental pass to convert all floating point operations to the equivalent constrained intrinsics

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 16:44:29 PDT 2018


hfinkel added a comment.

In https://reviews.llvm.org/D43142#1284135, @cameron.mcinally wrote:

> I don't think this will work. The ConstantFolder could fold away traps early in the IRBuilder. We also wouldn't catch the FNeg/FSub case either.
>
> I think Clang would need to explicitly generate the constrained intrinsics.


To be clear, this is something that we need to address even if it seems possible to do it another way. A core part of our project development practice is that we never leave the IR, in between passes, in a semantically invalid or inconsistent state. We always have a single IR semantic interpretation and phase ordering concerns matter only for performance, and effectiveness, not correctness. If we do something else, that should be an explicit decision (that should be discussed on the dev list).


https://reviews.llvm.org/D43142





More information about the llvm-commits mailing list