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

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 11:45:30 PDT 2018


kpn added a comment.

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

> In https://reviews.llvm.org/D43142#1284190, @kpn wrote:
>
> > And couldn't we turn off constant folding in the IRBuilder when necessary?
>
>
> I don't think that would work in all cases. E.g. a binary operator with two constant operands.
>
>   int main() {
>     float z = 5.0/0.0;
>     return z;
>   }
>
>
> Well, not without a considerable effort to rework the IRBuilder at least. I'm fairly sure we can't produce an Instruction with two Constant operands right now.


Then don't we have to deal with this sometime? If #pragma FENV_ACCESS ON is set for the main() example above then is constant folding allowed?


https://reviews.llvm.org/D43142





More information about the llvm-commits mailing list