[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 08:14:21 PST 2018


spatel added a comment.

In https://reviews.llvm.org/D53157#1290220, @kpn wrote:

> In https://reviews.llvm.org/D53157#1290044, @spatel wrote:
>
> > Should the builder's FastMathFlags setting apply to these calls? Is it worth adding an optional FMF parameter to these now, so we don't end up with duplicated API like we have for the regular FP binops?
>
>
> In the interest of having these new calls be like the non-strict ones, I think this does make some sense.
>
> Would it be enough to model after the existing FP binops and take an Instruction argument to copy the flags from?


Yes, that's the typical usage - copy the flags over from some existing instruction. I don't remember why the existing code has 2 versions of each. If the optional parameter isn't there, then we should just use the buillder's default FMF on the new call?


https://reviews.llvm.org/D53157





More information about the llvm-commits mailing list